Tuesday, June 4, 2019

macOS 10.15 Switches From bash to zsh

Apple (Hacker News):

Starting with the macOS Catalina beta, your Mac uses zsh as the default login shell and interactive shell. You can make zsh the default in earlier versions of macOS as well.

[…]

zsh is highly compatible with the Bourne shell (sh) and mostly compatible with bash, with some differences. For more about zsh and its comprehensive command-line completion system, enter man zsh in Terminal.

It doesn’t change the default shell of existing accounts.

Greg Hurrell:

I like Zsh and use it, but I don’t know why anyone would be excited about this. It is probably going to be a years-old version anyway. I’ll still be installing it with Homebrew.

It actually seems to be the current version, 5.7.1.

See also: Wikipedia.

Update (2019-06-04): Greg Hurrell:

All of this probably motivated by a desire to get away from GPL to MIT.

I think that’s it. The version of bash included is from 2007.

Previously: Mojave’s rsync From the Days of Tiger.

Update (2019-06-06): Matthew (2002, tweet):

As of 10.10 the remaining GPL-only packages seemed to be JavaScriptCore, bash, bc, emacs, efax, gnudiff, gnuserv, gnutar, groff, gpatch, keymgr, libstdcxx, man, nano, screen, texinfo, and uucp. I include this list as Apple have stopped listing the licenses on their download page, to make it harder to track their progress…

The trend supports the idea that Apple is trying to remove all GPL-licensed software from OS X.

See also: Slashdot, Hacker News.

Armin Briegel:

Apple is strongly messaging that you should switch shells. This is different from the last switch in Mac OS X 10.3 Panther, when Apple switched the default to bash, but didn’t really care if you remained on tcsh. In fact, tcsh is still present on macOS.

Apple’s messaging should tell us, that the days of /bin/bash are numbered. Probably not very soon, but eventually keeping a more than ten year old version of bash on the system will turn into a liability. The built-in bash had to be patched in 2014 to mitigate the ‘Shellshock’ vulnerability. At some point Apple will consider the cost of continued maintenance too high.

Update (2019-10-11): snipe:

zsh is the new default shell for MacOS Catalina. To change it back and get rid of the super annoying terminal message, enter:

chsh -s /bin/bash

in a terminal, then open /home/your-user/.bash_profile & add export BASH_SILENCE_DEPRECATION_WARNING=1

8 Comments RSS · Twitter

To expand, I think there are security flaws in the version of bash Apple uses that are fixed in the GPL version. While a minor security issue I can see Apple wanting to move away from it for people who don't use the shell regularly. Everyone else if they want bash can just install it via Homebrew or MacPorts.

I believe this is specifically about newer versions of Bash being licensed under the GPL3.

A little disappointed they didn’t make the jump to Fish, which is probably about as modern and good as it’s possible for Unix shells to get within the fundamental flaws and limitations[1] of the traditional *nix platform. But I can understand and accept the more conservative choice, given zsh is mature, reasonably bash script-compatible, already included as standard, and shouldn’t trigger too many shitfits from the traditional “John Birch-er” *nix base who are never going to enjoy change anyway, never mind such a “radical progressive” change as jumping to a shell from the 1990s.

--

[1] Including but not limited to: untyped, untagged streams; bloated, ambominably-factored commands such as `ls`; no separation of logic from presentation; no introspection; no typography or other UX support newer than 1971; etc. Yuuuuup.

Jean-Daniel

Remind me of first OS X version, where tcsh was the default shell.

Nowaday, I'm exclusively using fish in my terminals (and sometimes bash for scripting, which will still be possible).

[…] the lowest levels you’ve got full access to a Unix environment with Bash (haha) and all the other standard scripting languages and tools. (For […]

Sören Nils Kuklau

[1] Including but not limited to: untyped, untagged streams; bloated, ambominably-factored commands such as ls; no separation of logic from presentation; no introspection; no typography or other UX support newer than 1971; etc. Yuuuuup.

In an episode of ‘how the other half lives’, PowerShell arguably solves many of those (in an incompatible way, mind you).

And now PowerShell even runs on the Mac.

That said, whatever the complicated reasons, it never quite seemed to take off as the definitive new way to do a command line.

[…] mjtsai.com 4m 52s For those of you not familiar. Michael Tsai has run one of the definitive Apple developer link blogs for years. Not only does he round-up the best sources of information, he arranges them in a narrative structure that reads like a news article with his own commentary interspersed. […]

[…] the lowest levels you've got full access to a Unix environment with Bash (haha) and all the other standard scripting languages and tools. (For […]

Leave a Comment