Set PERMANENTLY environment vars in macOS using szh profile

 Open Terminal

Go to Spotlight search and open TERMINAL App.

2. Open ZSH Profile file using nano editor

MyMACBOOK-PRO>nano ~/.zprofile

3. Update the File

Here we will set Android SDK variables as an example. After opening the file paste the following contents at the very end of the file.

explamples:

export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_SDK_ROOT/tools/bin