Sunday, 3 February 2013

Configuring Proxy for Ubuntu 12.04


apt utility configuration.
Add the following lines in /etc/apt/apt.conf
Acquire::http::proxy "http://<username>:<password>@<proxy>:<port>/";
Acquire::ftp::proxy "ftp://<username>:<password>@<proxy>:<port>/"; 
Acquire::https::proxy "https://<username>:<password>@<proxy>:<port>/";
 
Or you can add the following line in file /etc/apt/apt.conf.d/01proxy
 
For terminal configuration .
 
This will set the proxy for utilities that are run from the terminal  
 
export http_proxy=http://<username>:<password>@<proxy>:<port>
export https_proxy=http://<username>:<password>@<proxy>:<port>
 
If these settings are included in .bashrc or .profile these settings will be applied at the time of user login.
 
Synaptic package manager
The synaptic package manager has option for the proxy settings to be configured in Settings ->Preferences ->Network