Celeb Glow
general | March 18, 2026

Proxy authentication with terminal Ubuntu 14.04

I would like to access the internet to update files etc. from the terminal on a secured proxy network. I've already tried the following:

  1. Adding to /etc/apt/apt.conf, /etc/apt/apt.conf.d/01proxy, /etc/apt/apt.conf.d/01ubuntu:

    Acquire::http::proxy "";
  2. export http_proxy= on a terminal.

  3. Adding export http_proxy=to /etc/bash.bashrc

These were few of the major efforts. There are no spaces in my username nor are there any special characters in my password (especially "@"). I've double checked and all the information entered is correct. The info is correct because it works with the browser (Manual proxy in Network and authentication when first opened the browser). I've also tried by making the "p" in "proxy" into capitals but to avail. I always get the error: 407 Proxy Authentication Required.Any help is appreciated.

1

3 Answers

Test this:

sudo su -
apt-get update
apt-get install ntlmaps

Configure it: domain, username, password, proxyserver.net, port

Files:/etc/bash.bashrc

export http_proxy=
export https_proxy=
export ftp_proxy=

/etc/environment

http_proxy=
https_proxy=
ftp_proxy=

/etc/apt/apt.conf (create the file if it does not exist)

Acquire::http::Proxy "";
Acquire::https::Proxy "";
Acquire::ftp::Proxy "";
3

What you did (export http_proxy=) is actually pretty close to what works for me:

http_proxy=""
export http_proxy

I hope this works for you, too. ;)

2

It is possible that your password has a special character that needs to be 'escaped', or be encoded properly for a URL.

For example, the following characters need to be encoded (but there are many others):

  • #
  • @
  • %

If your password contains special characters, be sure they are properly URL-encoded.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy