If you want to reload the zsh shell profile once you have made changes to the .zshrc file, make use of the source command.
The source command can be used in Unix-like operating systems to execute the contents of a shell script within the current shell environment, rather than launching a new shell to run the script.
Steps to reload zsh profile
- Make sure you are in the zsh shell, if not just type zsh in Terminal and hit enter.
- Now run the below command,
% source ~/.zshrc
Once you run the source command followed by the location of zshrc file the zsh shell will be reloaded with the updated environment. Any changes you made to your configuration file will take effect immediately.
Note: if the file .zshrc is not present you will get en error.
source: no such file or directory: /Users/user/.zshrc
Gif Demo
Facing issues? Have Questions? Post them here! I am happy to answer!
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
- 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
- [Java] Generate Getters and Setters in VS Code - Java
- Unsupported major.minor version 52.0 in java - Java
- Fix: KeyError: exception in Python - Python
- Mac: How to Merge Cells in Excel - MacOS
- Fix: zsh: command not found: aws (Mac/macOS) - AWS
- Terminal display next month Calendar - Linux
- Java Program: Random Number Generator - Java
- How to Check For Updates on Windows 11 (Step-by-Step) - Java