export http_proxy: where does the proxy setting get stored?

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

export http_proxy=""

and then my internet connection was having trouble.

In which file this export http_proxy information got stored ?

Thanks.

2

4 Answers

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 for details. Note that this is not a script file but a configuration file.

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=""

You can use unset command to remove the environment variable.

unset http_proxy

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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like