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 am using Curl, and am having a problem trying to get it to recognize the $http_proxy environment variable when using sudo curl. I tried putting export http_proxy=.... in my /etc/profile and restarting the shell, to no avail. I would rather not use su -l and run the command while logged in as root.

share|improve this question
up vote 1 down vote accepted

Look in /etc/sudoers. There is a list of environmental variables that get shared between sudo and the regular user shell

share|improve this answer

You might need to add:

envkeep http_proxy

to your sudoers file. Check your sudo environmental variables by running:

sudo -V

as root. Or by running:

sudo sudo -V
share|improve this answer

You must log in to answer this question.

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