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

-
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to zsh,
- Resolve - zsh: command not found: code
- zsh: command not found [fix] macOS
- How to fix: zsh: command not found: jupyter
- How to make ZSH as the default shell on Ubuntu
- How to Add New Entry to ZSH PATH
- Add Syntax Highlighting in Zsh Shell
- Fix: zsh: command not found: npm after installation (Node.js)
- Fix: zsh: command not found: mysql (Mac XAMPP)
- Ubuntu zsh: command not found: nano
- Fix: ZSH: cd: too many arguments (macOS)
- Fix - cd: no such file or directory: .zshrc
- How to reload zsh shell profile file?
- Fix zsh: permission denied: script.sh
- [fix] zsh: illegal hardware instruction python TensorFlow M1/M2 Mac
- macOS Ventura 13: The default interactive shell is now zsh
- How to Add Autocomplete in Mac Terminal
- Fix - zsh: command not found: pip
- ZSH: exec format error eclipse M1/M2 Mac
- Setting up Zsh Syntax Highlighting
- How to reload Zsh .zshrc Profile
- zsh: command not found: brew [fix]
- How to clear ZSH history of commands executed on Mac Terminal
- Fix - zsh: command not found: conda [macOS]
- Fix: cd: string not in pwd
More Posts:
- Java - Calculate time taken for the code to execute in milliseconds or nanoseconds - Java
- Python: pandas merge DataFrames on Common Column - Python
- How to Get the Current Date and Time in Java 8 and Above - Java
- Safari Full Screen Shortcut using Keyboard [macOS] - MacOS
- Enable Cloud Based Clipboard for Images and Text on Windows 10/11 - Windows
- MongoDB: Failed to connect to 127.0.0.1:27017 reason: Connection refused - HowTos
- How to set an emoji as Zsh terminal prompt in macOS - MacOS
- Change default language highlighting in Notepad++ - NotepadPlusPlus