Shell Config File on Mac
Updated: Mar 3, 2022
When writing about things like tool installation or environment setup on Mac, I often need to mention shell config files. So, instead of doing that each time, I’m going to (hopefully) write about it once, then reference it as needed.
Which Shell Am I Currently Running? #
Starting with Catalina, Zsh is the default shell. (You can change it back to Bash if you like).
You can check which shell you’re currently running with the below command 1.
ps -p $$
Which Config File Should I Use? #
On Mac, the Terminal app defaults to a login shell 2. So, assuming you haven’t messed with the Terminal settings, you can make changes to the login config file, then expect those changes to show up in new Terminal windows or tabs.
Note: If the login config file for your shell doesn’t yet exist, create it.
|Shell||Location||Login Config File||Interactive Config File|