Introducing zsh
Z Shell was created in 1990 by Paul Falstad. It’s an extension of the Bourne Shell, but also includes features from bash
, Korn Shell (ksh
), and C Shell (tcsh
).
The C Shell, which used to be somewhat popular with Unix and Unix-like distros, is vastly different from anything you’ve seen. Writing a C Shell script is more akin to writing a C language program than it is to what you’re used to. So if you’re a C language programmer, you might like it. If you’re not, then you might not like it so much.
Z Shell comes as the default login shell for both macOS and Kali Linux. For pretty much everything else, you’ll need to install it yourself. As far as zsh
scripting goes, most of what you’ve learned about scripting in bash
also applies to scripting in zsh
. So, in this chapter I’ll just present the unique features of zsh
, and show you some simple scripting examples.