Skip to content

Instantly share code, notes, and snippets.

@hindol
Last active January 30, 2024 00:27
Show Gist options
  • Save hindol/4483374 to your computer and use it in GitHub Desktop.
Save hindol/4483374 to your computer and use it in GitHub Desktop.
How to setup proxy for `sudo` environment. Tested for `Ubuntu` and `Linux Mint`.
# The following should be in `/etc/sudoers`. To edit `/etc/suoders` use the command `sudo visudo` in a terminal.
# *Do NOT attempt to modify the file directly*
Defaults env_reset
Defaults mail_badpass
Defaults env_keep+="http_proxy ftp_proxy all_proxy https_proxy no_proxy" # Add this line
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment