Proxy Setting for Apt is needed for us who work behind proxy. It is needed for ubuntu update, package installation, and ubuntu upgrade. This proxy setting used by apt can be configured with apt.conf and if it’s not configured ubuntu will use or read proxy configuration environtmen. read this post setting proxy bactrack or ubuntu to set proxy environtmen.
On ubuntu 10.04 we can find apt.conf in /etc/apt, but on ubuntu 11.04 i can’t find this file. Reading from some articles i found out that ubuntu 11.04 will still read apt.conf configuration if this file is exist. so i just create file apt.conf in /etc/apt/
1. Create apt.conf
nano /etc/apt/apt.conf
2. Insert lines like this
Acquire::http::proxy “http://proxyserver:port/”;
Acquire::ftp::proxy “ftp://proxyserver:port/”;
Acquire::https::proxy “https://proxyserver:port/”;
change the proxy server and port to your own proxy setting, for example :
Acquire::http::proxy “http://127.0.0.1:3128/”;
Acquire::ftp::proxy “ftp://127.0.0.1:3128/”;
Acquire::https::proxy “https://127.0.0.1:3128/”;
or if with username and password
Acquire::http::proxy “http://username:password@proxyserver:portnumber/”;
Acquire::ftp::proxy “ftp://username:password@proxyserver:portnumber/”;
Acquire::https::proxy “https://username:password@proxyserver:portnumber/”;
for example :
Acquire::http::proxy “http://george:asdft432@cache.campus.com:8080/”;
Acquire::ftp::proxy “ftp://george:asdft432@cache.campus.com:8080/”;
Acquire::https::proxy “https://george:asdft432@cache.campus.com:8080/”;
source :
http://askubuntu.com/questions/38823/how-to-use-apt-get-synaptic-behind-a-proxy
Nice post.
Small correction, the ‘Acquire’ should be ‘acquire’ and if anyone is copying entry from above, please make sure that you enter the double quotes manually.
Thanks a lot man 😉
Great post… and thanks to @srikant for the corrections…
no need for any modifications……above given info is 100% correct….