Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running Ubuntu 12.04 server inside my company network. It requires a proxy in order to access network outside. I configured the proxy during installation. After that, I found my proxy setting was saved in /etc/apt/apt.conf. But it's not in environment variables. However, wget is also able to download a web page through proxy. Where does wget (and other programs) read my proxy setting?

share|improve this question
up vote 8 down vote accepted

As usual I suppose nobody cared to integrate all the communications settings for the programs used in Linux/Ubuntu, which is a pity.

In 11.10 you have system wide settings in several locations:




The command apt has its settings in this file:

Acquire::http::proxy "http:/user:pass@my.proxy:port"


The command wget has its settings in this file following the same format as the /etc/environment file mentioned above.


Provided 12.04 has the same file configuration as 11.10 regarding these three programs you can edit these files for the server.

I had a script file to change all these things in 11.10 back and forth between my work and home, but now I am not using that script until I know more details about how 12.04 works with these issues.

share|improve this answer

wget uses /etc/wgetrc in which you'll find HTTP and HTTPS proxy lines to uncomment and edit with your proxy settings.

share|improve this answer

Many of the linux command lines can make use of the environment variables http_proxy and ftp_proxy. Just set these in your .bashrc file or setup a shell script to set these environment variables prior to running commands such as apt or wget etc.

export http_proxy=http://proxyserver:port/
export ftp_proxy=http://proxyserver:port/
share|improve this answer

wget, and many other programs, get proxy information from the http_proxy environment variable. Try the command echo $http_proxy in a shell to make it is set.

share|improve this answer
wget maybe but not apt-get (on 12.04.1) – majkinetor Dec 5 '12 at 15:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .