Search this site

Thursday, February 23, 2012

Ubuntu Linux: Update/Upgrade the Linux from behind an Internet proxy server

If you use Internet connection that needs proxy, user name and password, then in order to update your system (installing security patches/bug-patches) or upgrade to new version following configuration can be done from command line:

1. Open apt.conf file with root privileges by simply typing following command in terminal:

$ sudo gedit /etc/apt/apt.conf

2. If IP address of your Internet proxy is and port is 8080, then add following lines in the apt.conf:

Acquire::http::proxy "";
Acquire::ftp::proxy "";
Acquire::https::proxy "";

2. If your proxy requires username and password for authentication, then add following lines:

Acquire::http::proxy “http://username:password@";
Acquire::ftp::proxy “ftp://username:password@";
Acquire::https::proxy “https://username:password@";

Note that:

  • If your proxy doesn't allow PING, then you won't be able to ping.
  • If you are using special characters such as !,@,#,$,%... in your password, then you must use URL encoding for each of them. For example, "#" in password would be "%23". You can get the encoded values for special characters from online encoders available on Internet, for example:

3. Now, to update (packages), simply type:

$ sudo apt-get update
$ sudo apt-get upgrade

Note that:

  • Synaptic Package Manager has been dropped from Ubuntu 11.10
  • Ubuntu 11.10 Update Manager should also work with this settings.

No comments:

Post a Comment