How to Add New Entry to ZSH PATH

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
Add New Path to PATH environment variable ZSH Example

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!