Howto- Configure Ubuntu 13.10 behind Proxy with Authentification Required

Howto- Configure Ubuntu 13.10 behind Proxy with Authentification Required

After Installing Ubuntu 13.10 Saucy, I was not able to update behind the http proxy. Here how i solved this.

root@ubuntu-unixmen:~# apt-get update
Err saucy InRelease
Err saucy-updates InRelease
Err saucy-backports InRelease

Follow the steps bellow to be able to execute apt-get behind a proxy:

$ cd /etc/apt
$ sudo vi  apt.conf

add this to the  file:

Acquire::http::Proxy "http://user:pass@proxy_host:port";


Acquire::http::Proxy "http://Domain\user:pass@proxy_host:port";

Now export the proxy line with:

export http_proxy=http://user:pass@proxy_host:port


export http_proxy=http://Domain\user:pass@proxy_host:port

To make this command permanent add it to ~/.bash.rc in your home directory:

vi ~/.bash.rc

Now Check and restart the updates:

root@ubuntu-unixmen:/etc/apt# apt-get update
Ign saucy-security InRelease
Get:1 saucy-security Release.gpg [933 B]
Get:2 saucy-security Release [49.6 kB]
Get:3 saucy-security/main Sources [3,993 B]
Ign saucy InRelease
Get:4 saucy-security/restricted Sources [14 B]
Get:5 saucy-security/universe Sources [14 B]
Get:6 saucy-security/multiverse Sources [14 B]
Get:7 saucy-security/main i386 Packages [14.9 kB]

Upgrade Now:

root@ubuntu-unixmen:/etc/apt# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
apport python3-apport python3-problem-report
3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 307 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]?


  • Dave Bucci

    Any way to do it without hardcoding your proxy password into the link, to make apt prompt for the password? Not optimal to have that password in the environment, in ~/.bash.rc …

  • Mel Kham

    Not possible, this is the only way.

  • Navin Dhanaraj

    Hi Mel Kham,

    Thanks for your post.

    If a domain name is used in the proxy setting then it has to be followed by ” and not ‘/’. Please fix the the same in your post.


  • MEl Kham

    Is fixed now Domainuser

  • Rajitha Buddhika Wickramarathn

    how it works with proxy ip:port (without user:pass)

  • google

    When someone writes an article he/she keeps the image
    of a user in his/her brain that how a user
    can know it. Thus that’s why this post is perfect. Thanks!

  • Wholesale Nike NFL Jerseys
  • soccer jerseys cheap
  • nfl jersey supply
  • wholesale nba jerseys usa