ZSH is the default shell for macOS. If you want to add a new entry to the existing $PATH environment variable, you can do that in the below steps,
Step 1: Open .zshrc file
nano ~/.zshrc
Step 2: Add an Entry to $PATH
export PATH=/the/new/path:$PATH
Step 3: Save Changes
Press Control + X and then Y to save the changes.
Step 4: Update Changes
source ~/.zshrc

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!