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) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

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