Glossary

zsh

Also known as: Z shell

zsh (the Z shell) is a modern Bourne-compatible shell written by Paul Falstad in 1990. It is largely a drop-in replacement for bash but adds a wealth of interactive features: programmable completion far richer than bash's, themeable prompts with per-segment colour and git status, shared history across sessions, spelling correction, right-side prompts, and a module system. It became the default shell on macOS in 2019.

zsh's famous partner is Oh My Zsh, a community-driven framework that packages hundreds of plug-ins and themes into an easy-to-install bundle. Along with Prezto, Zinit, and Starship (a cross-shell prompt), it has made zsh the go-to shell for developers who want a polished interactive experience without writing their own configuration from scratch.

Configuration lives in ~/.zshrc. Compared with bash, zsh has better globbing (including recursive **), cleaner array syntax, and a setopt command for turning on individual features. For scripts it is slightly slower than bash but quite capable; however, because it is not installed by default on most Linux servers, shell scripts intended for wide deployment still typically use bash or sh.

Related terms: Shell, bash, fish

Discussed in:

Also defined in: Textbook of Linux