​​ ​

The Apple Support Community will permanently close on November 20, 2026. Starting today, the site will no longer accept new posts and is available in a read-only state.


You can continue to find trusted guidance and support on the official Apple Support site. 


We want to thank the community members who have contributed their time and expertise to help others with their Apple products.


ZSH

I just change my bash to zsh. I am new at this and so what do I do now?

MacBook Pro 13″, OS X 10.11

Posted on May 26, 2023 11:27 AM

Question marked as Top-ranking reply

Posted on May 26, 2023 12:17 PM

The Zsh shell is far more powerful than the Bash that it replaced, and Zsh will not read the Bash dot-files (.e.g. .bashrc, .bash_profile, .profile, etc.) so you will need to at minimum, create a .zshrc dot file in your home directory with a minimal PATH and PS1 prompt, as Zsh's shell prompts are different too.


Check to determine if you already have a $HOME/.zshrc file present. Zsh will not create one, so if it is not there, then copy/paste the following HERE script into the Terminal and then press enter afterwards.


<<"EOF" > ~/.zshrc
export PATH=".:/usr/local/bin:${PATH}"
PS1="%m: %~ %% "
EOF


Once that .zshrc file is present, and in the current Terminal session, do the following:


source ~/.zshrc


The Zsh shell will continue to run any Bash scripts where the shell syntax is still supported by Zsh, though the Zsh shell is incredibly more powerful than the Bash shell it replaces.


I would stay away from Zsh enhancement utilities such as Oh my Zsh. I don't use it.


Some additional reading:


Zsh Documentation


Zsh Native Scripting Handbook


A Guide to Zsh Expansion


Zsh - Notes


Master Your Z Shell with These Outrageously Useful Tips



3 replies
Question marked as Top-ranking reply

May 26, 2023 12:17 PM in response to PrincessPMW

The Zsh shell is far more powerful than the Bash that it replaced, and Zsh will not read the Bash dot-files (.e.g. .bashrc, .bash_profile, .profile, etc.) so you will need to at minimum, create a .zshrc dot file in your home directory with a minimal PATH and PS1 prompt, as Zsh's shell prompts are different too.


Check to determine if you already have a $HOME/.zshrc file present. Zsh will not create one, so if it is not there, then copy/paste the following HERE script into the Terminal and then press enter afterwards.


<<"EOF" > ~/.zshrc
export PATH=".:/usr/local/bin:${PATH}"
PS1="%m: %~ %% "
EOF


Once that .zshrc file is present, and in the current Terminal session, do the following:


source ~/.zshrc


The Zsh shell will continue to run any Bash scripts where the shell syntax is still supported by Zsh, though the Zsh shell is incredibly more powerful than the Bash shell it replaces.


I would stay away from Zsh enhancement utilities such as Oh my Zsh. I don't use it.


Some additional reading:


Zsh Documentation


Zsh Native Scripting Handbook


A Guide to Zsh Expansion


Zsh - Notes


Master Your Z Shell with These Outrageously Useful Tips



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

ZSH

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.