Free Resources to Learn the ZSH Language
Learn the Language of the Most Popular Shell
The first paragraph on Zsh homepage says: “Zsh is a shell designed for interactive use, although it is also a powerful scripting language.
If you write scripts for the command line and are not limited by Bash (or POSIX) compatibility requirements, you will probably find the resources below useful for learning how to write fast and efficient scripts to work in the terminal.
In the links below you will also find the best tips, tricks, and examples for working in a Z shell (ZSH).
What is Zsh?
A shell (terminal, command prompt) is simply an interface to the operating system on your computer. An interactive shell allows you to enter commands via what is called standard input, or stdin, and receive output via standard output (stdout) and error messages (stderr).
There are many shells such as Bash, Csh, Ksh, Tcsh, Dash and of course Zsh. Each has its own particular way of doing things, based on what their developers thought was best when creating that particular shell. How those features are important or necessary, everyone decides for themself. Here we will consider only what applies to ZSH.
Zsh can be installed using the standard package manager.
For Fedora, RHEL, and CentOS:
For Ubuntu and Debian:
In macOS, starting with Catalina, Zsh is already the default shell. However, if for some reason your computer uses a different one, you can install Zsh using MacPorts:
It is possible to install Zsh on Windows, but only on top of Linux or a Linux-like layer such as Windows Subsystem for Linux (WSL) or Cygwin. Since this would be a separate post, I recommend studying Microsoft’s official documentation to understand how to do it.
Now to the links…
The official documentation is at https://zsh.sourceforge.io/Doc/Release/index.html#Top.
Zsh Reference Card is a very detailed document by the creator of Zsh, Peter Stevenson.
The zsh-lovers page has many interesting examples and tricks for using it.
“From Bash to Z Shell” or “The Zsh Book” - you can download it for free at https://github.com/apress/from-bash-to-z-shell.
If you’re googling for something specific about working in Zsh, then add
site:https://www.zsh.org/mla/to search through the Zsh mailing list archive.