How to allow ADB in Mac Terminal

Problem:
Cannot find the command adb in Mac terminal

Solution:
Ensure the environmental variable is setup in $HOME/.zshrc

This is a hidden file, if doesn't exist, can create a new one under $HOME
2021-05-23_11-26-42

nano $HOME/.zshrc

Install Android Studio and find out the android SDK installation folder

2021-05-23_11-29-42

2021-05-23_11-28-35

Add the following code into the .zshrc file

export ANDROID_SDK_ROOT="<your Android SDK path>"
export PATH="$ANDROID_SDK_ROOT/platform-tools:$PATH"

Where is the above Android SDK installation folder on your mac

2021-05-23_11-24-42

Save the file and you can now access ADB directly