Why zsh change?
Why the change to zsh? How does setting default shell affect shell in use? How do I choose the shell in use? What are the long-term consequences of silencing the bash warning? How do I test whether the zsh shell will meet my needs?
You can make a difference in the Apple Support Community!
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
Why the change to zsh? How does setting default shell affect shell in use? How do I choose the shell in use? What are the long-term consequences of silencing the bash warning? How do I test whether the zsh shell will meet my needs?
The Bash 3.2.57 shell was introduced in 2007, and remains in Catalina, but could not be upgraded due to GNU licensing (GPL3) to Bash 4.4+. Zsh has licensing that allows Apple to keep it current, and offers many advanced features not found in either Bash version.
By changing your default shell to zsh, you no longer have the Bash shell as default when the Terminal launches — it will be zsh, which will not read the bash dot files. You can switch to Bash at any time interactively from zsh by typing bash and return in the Terminal.
There are no long term consequences of silencing that change shell prompt when you launch Terminal. However, at some future point, Apple may change the shell on you without your intervention.
You can simply type zsh at the Terminal prompt and land in the zsh shell. There is some existing Bash syntax supported by zsh, but the Terminal prompt is different from bash, and the dot files are different. See the zsh web site for current documentation, or Google what you want to do in zsh.
The Bash 3.2.57 shell was introduced in 2007, and remains in Catalina, but could not be upgraded due to GNU licensing (GPL3) to Bash 4.4+. Zsh has licensing that allows Apple to keep it current, and offers many advanced features not found in either Bash version.
By changing your default shell to zsh, you no longer have the Bash shell as default when the Terminal launches — it will be zsh, which will not read the bash dot files. You can switch to Bash at any time interactively from zsh by typing bash and return in the Terminal.
There are no long term consequences of silencing that change shell prompt when you launch Terminal. However, at some future point, Apple may change the shell on you without your intervention.
You can simply type zsh at the Terminal prompt and land in the zsh shell. There is some existing Bash syntax supported by zsh, but the Terminal prompt is different from bash, and the dot files are different. See the zsh web site for current documentation, or Google what you want to do in zsh.
RoHSwell wrote:
How do I test whether the zsh shell will meet my needs?
to add—
Change the default shell in Terminal on Mac
https://support.apple.com/en-lk/guide/terminal/trml113/mac
To see you current shell:
echo $SHELL
To see your options:
cat /etc/shells
To change shells, for ex. bash:
chsh -s /bin/bash
The GPL License for the current bash is incompatible with many application-distribution-systems, like the Mac App Store, and certain other software distribution platforms (on smartphones as well as PCs).
" zsh is more compatible with Bourne shell (sh) and mostly compatible with bash... before bash is fully phased out."
"Zsh is among the most powerful freely available Bourne-like shell for interactive use."
https://www.theverge.com/2019/6/4/18651872/apple-macos-catalina-zsh-bash-shell-replacement-features
You are welcome.
For some things zsh is less cryptic than Bash, and for others, far more cryptic. Take extracting the full filename from a path:
x="/some/path/to/a/foo.pdf"
Bash: echo ${x##*/}
Zsh: echo ${x:t}
Result: foo.pdf
Thanks, Leroy. that's a helpful shell tutorial.
RoHSwell wrote:
Thanks, Leroy. that's a helpful shell tutorial.
Good computing RoHSwell !
Thanks for the information. That fills the holes in the apple support page referenced by my login message.
Why zsh change?