August 23, 2016

Apt-get through proxy

First, try with this :

sudo http_proxy='http://user:pass@proxy.example.com:8080/' apt-get install package-name

If that doesn't work, open the following file sudo nano /etc/apt/apt.conf
Edit the content to be as below :
Acquire::http::proxy "http://:@:/";
Acquire::ftp::proxy "ftp://:@:/";
Acquire::https::proxy "https://:@:/";