I do export http_proxy=http://proxy:8080 export ALL_PROXY=$http_proxyon my Mac. Brew for instance relies on these settings. How can I make these settings stick between power cycles?Is this the recommended way aka best practice?echo PATH=$PATH:/path/to/whtaever >> ~/.bashrc && source ~/.bashrc
How to make PATH variable exports on MacOSX persistent?
bash;shell;osx
Adding entries to your .bashrc for settings to survive a powercycle (or just logout and login) is good practise, but both your examples have problems:export http_proxy=http://proxy:8080 export ALL_PROXY=$http_proxyonly sets and exports http_proxy on the first application:$ export http_proxy=http://proxy:8080 export ALL_PROXY=$http_proxy$ echo $http_proxyhttp://proxy:8080$ echo $ALL_PROXY$ export http_proxy=http://proxy:8080 export ALL_PROXY=$http_proxy$ echo $ALL_PROXYhttp://proxy:8080so put those on two separate lines in .bashrc in this order:export http_proxy=http://proxy:8080export ALL_PROXY=$http_proxyAppending to .bashrc using the echo command allows copy and paste as a one liner. It indiscriminatingly adds the entry and I rather would recommend to edit the file, search if there is already a definition, and replace it if there is (independent of doing such a thing for PATH or http_proxy). If you don't and there are multiple entries there is a good chance you update the wrong one, or just update http_proxy after the line with ALL_PROXY and wonder why the latter has the wrong value.