When I use any command with sudo the environment variables are not there. For example after setting HTTP_PROXY the command wget works fine without sudo. However if I type sudo wget it says it can’t bypass the proxy setting.
When I use any command with sudo the environment variables are not there. For
Share
The trick is to add environment variables to
sudoersfile viasudo visudocommand and add these lines:taken from ArchLinux wiki.
For Ubuntu 14, you need to specify in separate lines as it returns the errors for multi-variable lines: