How to reload zsh shell profile file?

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

  1. Make sure you are in the zsh shell, if not just type zsh in Terminal and hit enter.
  2. 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

Reload ZSH Shell GIF Demo

Have Questions? Post them here!