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.
Asked
Active
Viewed 999 times
0
quack quixote
- 43,504
2 Answers
1
Look in /etc/sudoers. There is a list of environmental variables that get shared between sudo and the regular user shell
Earlz
- 4,564
0
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
Marnix A. van Ammers
- 2,192