We also need to allow the proxy settings to be used by some programs, which use superuser permissions while accessing the network (this will depend on the program; most don't need this). We need to add the commands into a file stored in /etc/sudoers.d/ by performing the following steps:
- Use the following command to open a new sudoer file:
sudo visudo -f /etc/sudoers.d/proxy
- Enter the following text in the file (on a single line):
Defaults env_keep += "http_proxy HTTP_PROXY https_proxy HTTPS_PROXY ftp_proxy FTP_PROXY"
- Once done, save and exit by pressing Ctrl + X, Y, and Enter; don't change the proxy.tmp filename (this is normal for visudo; it will change it to proxy when finished).
- If prompted What now?, there is an ...