bash vs zsh on terminal

bash vs zsh on terminal. What is the best way to go?

MacBook Pro 16″, macOS 13.4

Posted on Jun 6, 2023 5:23 PM

Reply
5 replies

Jun 7, 2023 7:33 AM in response to sonieshine

Zsh does not read Bash dot files, and you will need just one really, which is .zshrc which the Terminal reads when it is launched. The following Zsh HERE document can be copied/pasted into the Terminal and followed by a return to write a new ~/.zshrc file:


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


If you are using homebrew on an Apple Silicon Mac, you may want to alter your PATH so you can see brew installed binaries:


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


and then:


source ~/.zshrc


The Zsh man pages are shown in:


man zshall


and the current documentation for the Zsh shell is there.

Jun 6, 2023 5:47 PM in response to sonieshine

Use whatever shell works for your needs. Whichever you prefer. Or use a different shell entirely.


Both bash and zsh have been around for a long while on macOS, and neither is going away.


bash isn’t going to get updated, but you can update it yourself.


Apple is defaulting new logins to zsh, and is updating that.


The earliest shell used with OS X was tcsh, so this zsh switch isn’t the first shell change.


And tcsh is still available with macOS 13.

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.

bash vs zsh on terminal

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