http_proxy - not working with sudo [closed]
- by Amil
I am working on RHEL6 behind a proxy at my workplace.
In order to make wget and other applications work, I modified my /etc/environment and added definitions for http_proxy, https_proxy, and ftp_proxy. I logged out and back in.
As desired, wget works correctly.
However, commands like sudo wget and sudo yum do not work. Upon further investigation, I see the reason is because my http_proxy settings are not being shown when I type "sudo env". In fact PATH is also reset.
How can I get http_proxy to be set for sudo?