Linux - Set up HTTP proxy for APT (apt-get)
To make APT (apt-get
command) work behind a proxy, apt.conf
(which is found in /etc/apt/
directory) file must be edited.
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
Resources
- https://wiki.debian.org/AptConf
- https://help.ubuntu.com/community/AptGet/Howto
- http://www.unixmen.com/configure-debian-squeeze-to-work-behind-a-proxy-faqs/
Categories & Tags
Related
- Basic Package Management on Linux Debian
- Install Proxy Server on Linux Debian (SQUID Web Proxy Cache)
- Linux - Set up HTTP proxy for GNU Wget (wget)
Share