Tested on: Ubuntu 9.10 (Karmic Koala)
- Using Synaptic
Navigate to Settings->Preference->Network in Synaptic package manager. Enter your proxy server details like: username:password@proxyserver, and put the proxy server port - Using Command Line
Add following lines to the end of ~/.bashrchttp_proxy=http://username:password@proxyserver:port/ ftp_proxy=http://username:password@proxyserver:port/ https_proxy=http://username:password@proxyserver:port/ HTTP_PROXY=http://username:password@proxyserver:port/ FTP_PROXY=http://username:password@proxyserver:port/ HTTPS_PROXY=http://username:password@proxyserver:port/ no_proxy=server1,server2 NO_PROXY=server1,server2
Replace username, password, proxyserver and port by relevant value. You can omit username:password if your proxy server do not require any authentication. All the names, like http_proxy, are obvious and self-explanatory. no_proxy can take any number of servers separated by comma. Then type following command in shellsudo visudo
It will open up a text editor in shell. Add the following line at the end of the fileDefaults env_keep += "ftp_proxy http_proxy https_proxy HTTP_PROXY HTTPS_PROXY FTP_PROXY NO_PROXY no_proxy"
It instructs to keep the variables from user environment to the sudo environment.