To set the https_proxy
environment variable in Mac OS or Linux:
Use the command specific to your shell. For example, in bash, use the export command, as in the example below:
export https_proxy=http://my.proxyserver.com:8080
To make this change persistent, add the command to the appropriate profile file for the shell. For example, in bash, add a line like example below to your .bash_profile
or .bashrc
file:
https_proxy=http://username:password@hostname:port
export $https_proxy