For every new session in OS X terminal, I have to make my proxy settings again. I do this by entering the command
export http_proxy="username:password@ip address:port number"
Is there a way to make these proxy settings once for all?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
To globally set an http proxy system-wide on MacOS (not just for a terminal session) you can use:
networksetup -setwebproxy wi-fi localhost 8080 networksetup -setwebproxystate wi-fi on
This assumes your network interface is called
Wi-Fi), and that your proxy is running on
To disable the proxy:
networksetup -setwebproxystate wi-fi off
This is equivalent to setting the proxy via mac system settings > Network > wi-fi > Advanced > Proxies > Web proxy.
I'm assuming you mean aliases, not proxys.
Add it to ~/.bashrc and ~/.bash_profile. See this guide for more depth. I don't believe OS X supports a ~/.bash_aliases file.