How to set user PATH permanently on Mac OS Catalina zsh shell

Using bash, you would have added PATH="$PATH:$(python3 -m site --user-base)/bin" to your .bash_profile, so that each bash session would have the proper directory to PATH.

In zsh, you would add that line to .zprofile instead.


cd && touch .zprofile && open .zprofile

This command will create and open a .zprofile file, and every path you save in the file will be permanently available on the terminal.

Android SDK paths for examples:

export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools

For macOS versions that are older than macOS Catalina use .bash_profile instead of .zprofile