Howto- Configure Ubuntu 13.10 behind Proxy with Authentification Required

by
Share this Article: Facebook0Google+0Twitter9LinkedIn0Reddit0StumbleUpon0

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 http://us.archive.ubuntu.com saucy InRelease
Err http://us.archive.ubuntu.com saucy-updates InRelease
Err http://us.archive.ubuntu.com 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";

 Or 

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

Or

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 http://security.ubuntu.com saucy-security InRelease
Get:1 http://security.ubuntu.com saucy-security Release.gpg [933 B]
Get:2 http://security.ubuntu.com saucy-security Release [49.6 kB]
Get:3 http://security.ubuntu.com saucy-security/main Sources [3,993 B]
Ign http://us.archive.ubuntu.com saucy InRelease
Get:4 http://security.ubuntu.com saucy-security/restricted Sources [14 B]
Get:5 http://security.ubuntu.com saucy-security/universe Sources [14 B]
Get:6 http://security.ubuntu.com saucy-security/multiverse Sources [14 B]
Get:7 http://security.ubuntu.com 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]?

Enjoy!

For questions please refer to our Q/A forum at : http://ask.unixmen.com/


Share this Article: Facebook0Google+0Twitter9LinkedIn0Reddit0StumbleUpon0