1

I was running into all sorts of issues with my univesity proxy a month back and I made some changes to a few files here and there to automatically export the proxy to the http_proxy variable.

Now the issue is, there's some command in some file which automatically sets the root user's proxy to a "http://oldproxy:8080" and I want to change it to "http://newproxy:8080". So as a result, everytime I open sudo su and check echo $http_proxy, it's set to the old value, even if I manually export http_proxy.

I found the file which automatically exports myname@mycomp's proxy and changed it, but I can't remember which while exports su's proxy.

Which file might that be?

1 Answer 1

1

Depending on the shell (probably bash - echo $SHELL) you're execing .bashrc or some variant of it or something like .profile.

There are also sometimes system wide settings /etc/bashrc which often spawns off another series of scripts (but called from .bashrc).

each time you sudo su you're getting a new shell and loading your profile. if you sudo su - you will load roots profile (or the user you are switching to).

Just typing 'export' through both methods should show you the differences between the two

Check what files your shell tries to load for environmental variables, that can be found in man page (man bash).

You must log in to answer this question.

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