Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata
cat << 'EOL' >>/etc/environment
no_proxy=localhost,, *
cat << 'EOL' >/etc/apt/apt.conf.d/95proxies
Acquire::http::proxy "http://proxyurl:80";
Acquire::ftp::proxy "ftp://proxyurl:80";
Acquire::https::proxy "http://proxyurl:80";
sudo reboot

The file:


Is the correct place to specify system-wide environment variables that should be available to all processes.
If you want this for the specified command only, use (as root):

http_proxy= apt-get update

Proxy Environment Variables:

http_proxy #Proxy server for HTTP Traffic
https_proxy #Proxy server for HTTPS traffic
ftp_proxy #Proxy server for FTP traffic
no_proxy #Patterns for IP addresses or domain names that shouldn’t use the proxy

No_Proxy needs to be configured

no_proxy=localhost,, *.my.lan

If you have an authenticating proxy, then the URLs will be different. Instead of:


You'll have:


Note that these are still URLs, so passwords (and possibly usernames) will have to be URL encoded.
For example, a username of muru and a password of )qv3TB3LBm7EkP} would look like:


apt-get, aptitude, etc. will not obey the environment variables when used normally with sudo. So separately configure them; create a file called 95proxies in /etc/apt/apt.conf.d/, and include the following:

Acquire::http::proxy "";
Acquire::ftp::proxy "";
Acquire::https::proxy "";

  • No labels