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

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2023 | Privacy Policy | About Us | Contact Us | Sitemap