Debian http_proxy setting

Need to set a HTTP proxy within a Debian system ?

Assuming your proxy server is on and listening on port 3128, then the below may help …

( If you need authentication you can use username:password@ like you would in an old style web browser – e.g. http://username:password@ )


Add /etc/profile.d/ containing

export http_proxy=


Add /etc/apt/apt.conf.d/99HttpProxy containing

Acquire::http::Proxy "";


Edit /etc/wgetrc and add

http_proxy =

(some system commands rely on wget, and may not otherwise use an environment variable, e.g. debootstrap; the http_proxy setting should be present by default but commented out).