Why does macOS Catalina use Zsh instead of Bash? Licensing


Yesterday, at its WWDC developer convention, Apple unveiled the latest version of the MacOS operating system. Codenamed Catalina, it’s a fairly significant update for the platform, not least because of the changes that have taken place under the hood. Take, for example, the default shell, which has been migrated from Bash to Zsh.

Bash has been the first macOS shell since OS X 10.2 Jaguar. For nearly sixteen years, MacOS builders have used it to jot down scripts and situation instructions to the underlying working system. It’s deeply ingrained in how builders work. So, why the sudden change?

In a phrase: licensing.

For properly over a decade, Apple has shipped macOS with a horrendously outdated model of GNU Bash. The default model on the final model of macOS, codenamed Mojave, is Bash 3.2. That dates again to 2007. For context, that’s the identical yr Apple unveiled the primary iPhone.

Regardless of that, the Bash mission is beneath lively improvement. It reached a serious milestone in January: model 5.0.

Newer variations of Bash are licensed beneath the GNU Basic Public License model 3 – or GPLv3 for brief. This comes with a number of restrictions which may doubtlessly have brought on a number of complications for Apple additional down the road.

Firstly, the GPLv3 embody language that prohibits distributors from utilizing GPL-licensed code on methods that forestall third events from putting in their very own software program. This controversial apply has a reputation: Tivoization, after the favored TiVo DVR packing containers that are primarily based on the Linux kernel, however solely run software program with an authorised digital signature.

Secondly, the GPLv3 consists of an specific patent license. This may be laborious to wrap your head round, however in a nutshell, it signifies that anybody who licenses code beneath the GPLv3 additionally explicitly grants a license to any of the related patents. This isn’t a complete licensing deal; it solely applies to the extent required to really use the code.

It additionally tries to guard customers from licensing offers that solely profit some customers. Right here’s how the Institute for Authorized Questions on Free and Open Supply Software program (IFROSS) describes it:

The brand new patent clause makes an attempt to guard the person from the results of agreements between patent house owners and licensees of the GPL that solely profit a number of the licensees (akin to the Microsoft/Novell deal).  The licensees are required to make sure that each person enjoys such benefits (patent license or launch from claims), or that nobody can revenue from them.

These two clauses are probably the rationale why Apple’s more and more fluctuate of GPL-licensed software program, and is desperately attempting to take away it from macOS. Between MacOS 10.5 Leopard and MacOS 10.12 Sierra, the variety of GPL-licensed packages that got here pre-installed decreased by an insane 66 p.c – from 47 to only 16.

So, it’s no shock that Apple’s shifting its customers away from Bash. I’m additionally not shocked to see Apple favor Zsh. For starters, it’s licensed beneath the MIT License, and subsequently doesn’t comprise the controversial language surrounding patents and Tivoization.

There’s additionally a strong (however not excellent) degree of compatibility between Bash and Zsh, which ought to make the transition simple.

Zsh additionally comes with a lot of the options you’d anticipate from a contemporary shell. On condition that macOS builders have been utilizing a shell that’s older than an honest bottle of Scotch, that is clearly an enormous promoting level.

It’s additionally price noting that macOS has include Zsh for ages – it simply hasn’t pushed it to builders. There’s completely nothing stopping you from getting conversant in proper now.


Please enter your comment!
Please enter your name here