When I use any command with sudo the enviroment 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.
Join Stack Overflow to learn, share knowledge, and build your career.
|
|
|||||||||
|
|
First you need to
Here is the quote from the man page:
|
|||||||||||||||||||||
|
|
The trick is to add environment variables to
taken from ArchLinux wiki. For Ubuntu 14, you need to specify in separate lines as it returns the errors for multi-variable lines:
|
|||||||||||||||||||||
|
|
For individual variables you want to make available on a one off basis you can make it part of the command.
|
|||||||||
|
|
You can also combine the two
You should also consider specifying
|
||||
|
|