Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 recently changed my password corresponding to my username for my proxy. Hence I updated the apt.conf and /etc/environment files with my new password. However when I type

echo $http_proxy



which prints all the environment variables, it displays the value with old password. Similarly for socks_proxy, all_proxy.

Any solutions?

share|improve this question

You can change the http/https/ftp proxy environmental variables using the following commands:

export http_proxy='http://user:password@prox-server:3128'
export https_proxy='http://user:password@prox-server:3128'
export ftp_proxy='http://user:password@prox-server:3128'

as a one-liner:

export {http,https,ftp}_proxy='http://user:password@prox-server:3128'

These will not persist however, so you may wish to add it to your bashrc.

share|improve this answer

Changes to /etc/environment requires a restart to take effect. First restart your computer and see if your still facing the same problem.

If the problem still exists, open your ~/.bashrc file and add the proxy entry in this file.

For this to take effect, you have to either restart your terminal or run source ~/.bashrc

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.