I have tried many link and none of them works for me. I have internet access in my college through a proxy with port 3128 and the proxy type is either http or https. I want to use apt-get to install softwares on ubuntu. Please help me. Please explain in detail as I am fairly new to ubuntu.



1 Answer 1


To set apt-get proxy open /etc/apt/apt.conf and add this line to the bottom of file.

Acquire::http::Proxy "http://yourproxyaddress:proxyport";

Or if you need a username and Password:

Acquire::http::Proxy "http://USERNAME:PASSWORD@yourproxyaddress:proxyport";

To set system wide proxy (not just apt) open ~/.bashrc and add this to the bottom of file.

export http_proxy

You can find more information here.

Not the answer you're looking for? Browse other questions tagged .