Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save potatoqualitee/f447b596de69abc413c53588b729a28d to your computer and use it in GitHub Desktop.
Save potatoqualitee/f447b596de69abc413c53588b729a28d to your computer and use it in GitHub Desktop.
Add proxy environment variables to Ubuntu for apt-get and command-line tools like curl and wget
# Edit /etc/apt/apt.conf.d/95proxies
Acquire::http::proxy "http://proxy.ad.local:8080/";
Acquire::ftp::proxy "ftp://proxy.ad.local:8080/";
Acquire::https::proxy "https://proxy.ad.local:8080/";
# Edit /etc/environment
http_proxy="http://proxy.ad.local:8080/"
https_proxy="http://proxy.ad.local:8080/"
ftp_proxy="http://proxy.ad.local:8080/"
no_proxy="localhost,127.0.0.1,localaddress,.AD.local"
HTTP_PROXY="http://proxy.ad.local:8080/"
HTTPS_PROXY="http://proxy.ad.local:8080/"
FTP_PROXY="http://proxy.ad.local:8080/"
NO_PROXY="localhost,127.0.0.1,localaddress,.AD.local"
# FOR JUST THIS SESSION, paste at the command line
export http_proxy="http://proxy.ad.local:8080/"
export https_proxy="http://proxy.ad.local:8080/"
export ftp_proxy="http://proxy.ad.local:8080/"
export no_proxy="localhost,127.0.0.1,localaddress,.AD.local"
export HTTP_PROXY="http://proxy.ad.local:8080/"
export HTTPS_PROXY="http://proxy.ad.local:8080/"
export FTP_PROXY="http://proxy.ad.local:8080/"
export NO_PROXY="localhost,127.0.0.1,localaddress,.AD.local"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment