Free Resources to Learn the ZSH Language
In this article we will learn what ZSH is, how to install it, and the most useful resources for learning Z Shell and its scripting language.
The command line (shell, terminal) is an interface that allows you to interact with the operating system using text commands. Commands are entered through the standard input stdin, the results of their execution are received on the standard output stdout and error messages are sent to stderr.
The command line is a powerful tool for working with the system, because it effectively automates routine tasks such as copying files, managing services and programs, configuring network settings, etc.
In addition, the command line usually allows you to work with files and directories more efficiently than with a graphical interface. It can also be useful for managing servers and working with remote systems. In general, working on the command line will be useful for anyone who wants to be efficient in managing different systems.
The links below will give you tips, tricks, examples, and resources for learning one of these shells, the Z shell (Zsh), as well as its scripting language.
What is Zsh?
The Z shell (also spelled Zsh) is one of the command shell implementations for Unix-based systems. It was originally written by Paul Falstad in 1990 and is an alternative to other popular shells such as Bash, Csh, Ksh, Tcsh, Dash or Korn shell.
Each of them has its own specific features based on what their developers thought was best when creating that particular shell. How important or necessary these or those features are is up to each person to decide for themselves.
Zsh has many features which can be useful for system administrators and developers. For example, such as autocompletion, improved search in command history, built-in features for working with files and directories, and more. It is also often used as the default shell in various Linux distributions.
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 a good place to start learning Zsh. It has everything from introductions, working with files, writing functions, to extending features by plugging in external modules. Read it here: The Z Shell Manual.
Zsh Reference Card by leading Zsh developer, Peter Stephenson. Contains general information, grammar, templates, all options, ZLE (Zsh Line Editor) keys, and more.
The Zsh-lovers page has many useful examples and tricks that can be used when working with the Z shell. There you will find information about settings, using functions to manage files and directories, useful scripts, tips and much more.
The ZZapper website has some interesting documents with information collected during extensive professional use of Zsh. There are many nuances described there, suitable more for professionals than for ordinary, everyday users.
A great series of articles about the migration from Bash to Zsh, with so many interesting tips and tweaks to the Z shell that the author has turned it into a book. You can read the articles here: Moving to Zsh.
An excellent, relatively fresh and detailed article Configure Zsh Options & Plugins. The author here shares his own experience how to configure, select and install plugins, themes and how to use the Z shell productively.
And lastly, if you are looking for something specific about Zsh you can add
site:https://www.zsh.org/mla/to search the Zsh mailing list when you search for it on Google, for example.
Bonus - short and to the point ZSH setup video:
Best for Zsh
The largest collection of frameworks, plugins, various themes, and tutorials on Zsh. Explore the Awesome Zsh Plugins GitHub repository.
One of the most popular frameworks for managing Zsh configuration is Oh My Zsh. It includes over 300 additional plugins, over 140 design themes, and an auto-update utility.
The most popular Zsh design theme is Powerlevel10K. It focuses on speed, flexibility, and out-of-the-box usability. The Powerlevel10k GitHub repository has gathered over 33,000 stars on GitHub.
Learning and using the Z shell will help you become more efficient and productive in your daily work with files, applications, local and/or remote systems. I hope that the above resources will help you to gradually customize this really powerful shell to your liking and enjoy being productive in it every day.