Knowledge Base

An archive of my personal knowledge base.

Linux - Set up HTTP proxy for APT (apt-get)

Cristian Sulea
Open apt.conf file with preferred editor:
nano /etc/apt/apt.conf
And add a new line with the proxy settings (or update if the line is already present):
Acquire::http::Proxy "http://user:password@server:port/";

Protect the proxy settings

By removing READ permissions for "all other users":
stat /etc/apt/apt.conf
chmod 640 /etc/apt/apt.conf


Share on Twitter