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

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!