7

Today by mistake I had entered the following command in terminal with incorrect information

export http_proxy="http://usrname:passwrd@host:port"

and then my internet connection was having trouble.

In which file this export http_proxy information got stored ?

Thanks.

  • 5
    Couldn't you just use the same command, but the right infomation? – horIzoN Apr 10 '13 at 13:30
  • 1
    yes, I did that but still I wanted to know. – cosmicraga Apr 10 '13 at 18:36
4

To my knowledge, the file:

/etc/environment

Is the correct place to specify system-wide environment variables that should be available to all processes. See https://help.ubuntu.com/community/EnvironmentVariables for details. Note that this is not a script file but a configuration file.

| improve this answer | |
4

You can reset the proxy back to its default (blank) by using the same command but not specifying any parameters as shown below:

export http_proxy=""
| improve this answer | |
2

You can use unset command to remove the environment variable.

unset http_proxy
| improve this answer | |
1

The only place manually running export foo="something" in a terminal is stored, is in the environment for the shell running inside that terminal. It does not get propagated to the rest of the system, and only further commands run within that terminal will see that value.

You can use the same command with the correct values to set it in that terminal, or you can close that terminal, and set the proxy settings in the System Settings, then log out and back in, so that they are used by that majority of your applications.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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