Apple Intelligence now features Image Playground, Genmoji, Writing Tools enhancements, seamless support for ChatGPT, and visual intelligence.

Apple Intelligence has also begun language expansion with localized English support for Australia, Canada, Ireland, New Zealand, South Africa, and the U.K. Learn more >

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.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

ZSH, seriously?

After upgrading to MacOS Monterey, I was stunned that Apple would switch my default shell to ZSH.


I immediately switched it back to BASH.


Some benefits of Bash:

  1. Press ESC twice to get a list of every Bash command, then issue a print to save as .PDF and have a complete listing at your fingertips
  2. history -c
  3. networkQuality
  4. Numerous other commands that don't work in ZSH


Why has Apple decided to switch?

Posted on Nov 23, 2021 8:20 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 23, 2021 8:37 AM

Apple switched to ZSH since Catalina over 2 years ago. It appears Bash is aging and may be going away in future macOS versions since Apple apparently cannot use Bash 4.


https://www.theverge.com/2019/6/4/18651872/apple-macos-catalina-zsh-bash-shell-replacement-features


Good explanation here of why it happened:

why is bash replaced with zsh? - Apple Community

11 replies
Question marked as Top-ranking reply

Nov 23, 2021 8:37 AM in response to Smilin-Brian

Apple switched to ZSH since Catalina over 2 years ago. It appears Bash is aging and may be going away in future macOS versions since Apple apparently cannot use Bash 4.


https://www.theverge.com/2019/6/4/18651872/apple-macos-catalina-zsh-bash-shell-replacement-features


Good explanation here of why it happened:

why is bash replaced with zsh? - Apple Community

Nov 23, 2021 8:50 AM in response to Smilin-Brian

Although Apple still includes the multi-decade old Bash 3.2.57 for legacy reasons, it remains unsupported. Apple does not include any GNU GPLv3 licensed code in the operating system, which excludes any newer Bash v5.1.8 (current) versions, or GNU software in general. Zsh is based on the MIT licensing model, and Apple has chosen to make this the default shell because they are committed to supporting it with future versions.


That said, you can continue to use Bash v3.2.57, or using a package manager, you can install Bash v5 and later.


Your:

  1. Tapping the escape button twice does not work with Bash 3.2.57 or v5.1.8 on macOS 11.6.1, or 12.0.1
  2. Zsh equivalent is history -p
  3. Zsh has network modules, otherwise what do you mean by networkQuality?
  4. Zsh is not a clone of Bash and of course there will be Bash-unique syntax that does not work in Zsh, as would be true of most other non-Bash based shells.


I have used Bash since Apple began to offer it, and I still believe Zsh is far more powerful. Most of my well written Bash scripts just work in the Zsh shell, with minor exceptions. I am no longer writing Bash specific scripts.

Nov 23, 2021 9:08 AM in response to Smilin-Brian

mr fish wrote:

After upgrading to MacOS Monterey, I was stunned that Apple would switch my default shell to ZSH.

I immediately switched it back to BASH1. .

Some benefits of Bash:
Press ESC twice to get a list of every Bash command, then issue a print to save as .PDF and have a complete listing at your fingertips
2. history -c
3. networkQuality
4. Numerous other commands that don't work in ZSH

Why has Apple decided to switch?


No one is going to penalize you for sticking with your beloved Bash.

It is more a license issue for Apple...


There are many Shells available to you either as default or on the fly, to see your options from Terminal copy&paste:

 cat /etc/shells

Nov 24, 2021 1:59 PM in response to Smilin-Brian

mr fish wrote:

Thank you, Bob! 😁

I probably should learn ZSH to help answer questions here.

I actually enjoy helping out. 😁👍🏼

I like helping in the forms as well, but at work, I've got Linux, Solaris, AIX, and sometimes Windows Cygwin environments that I do not control, all using bash, and we have a ton of bash scripts that need to be maintained. So for me, it is better if I stick to bash, then learn zsh. Maybe when I retire and ONLY have the macOS environment to play with, or maybe a Linux VM where I control the horizontal and I control the vertical, then I'll switch to zsh 😀

ZSH, seriously?

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