WIPIVERSE All articles

Z shell

The Z shell (commonly abbreviated as Zsh) is a Unix shell and command-line interpreter for shell scripts. It was created by Paul Falstad in 1990 while he was a student at Princeton University. The name derives from the login name of Zhong Shao, a teaching assistant at Princeton, whose login was "zsh."

Zsh mostly maintains the Bourne shell's syntax and behavior, but in its default configuration deviates from the POSIX standard specification of the sh language in several significant ways (such as eliminating implicit IFS-splitting and globbing upon unquoted parameter expansions) and adds substantially more features. It combines features from both ksh (KornShell) and tcsh, and to a lesser extent rc.

Key features include:

  • Programmable command-line completion — out-of-the-box support for several hundred commands, helping users type both options and arguments.
  • Extended file globbing — allows file specification without needing external programs such as find.
  • Improved variable and array handling (non-zero-based numbering).
  • Editing of multi-line commands in a single buffer.
  • Spelling correction and autofill of command names and optionally arguments.
  • Themeable prompts — including the ability to place prompt information on the right side of the screen that auto-hides when typing a long command.
  • Loadable modules — providing TCP and Unix domain socket controls, an FTP client, and extended math functions.
  • Sharing of command history among all running shells.
  • Named directories — allowing shortcuts such as ~mydir.
  • Function autoloading — a performance optimization for functions that can be pre-loaded and run on demand.

History and adoption:

  • Zsh was first released in 1990. The initial goal was to be a cross between ksh and tcsh — a powerful command and programming language that is well-designed and logical (like ksh) but also built for humans (like tcsh).
  • In 2019, macOS Catalina adopted Zsh as the default login shell, replacing the GPLv2-licensed version of Bash.
  • TrueNAS (formerly FreeNAS) changed its default shell from csh to Zsh in FreeNAS 11.2 (late 2018).
  • Kali Linux adopted Zsh as the default shell starting with its 2020.4 release.
  • Zsh is available for most POSIX/Unix-like operating systems as well as Microsoft Windows (via Cygwin or the UnxUtils collection).

Community and ecosystem: The "Oh My Zsh" community framework collects third-party plug-ins and themes. As of 2024, its GitHub repository has over 2,300 contributors, over 300 plug-ins, and over 140 themes. Other notable community projects include zsh-completions, zsh-syntax-highlighting, zsh-autosuggestions, and alternative configuration managers such as Zim and Antigen.

Technical details:

  • Written in: C
  • Stable release: 5.9.2 (July 2026)
  • License: MIT-Modern-Variant
  • Website: zsh.org
Browse

More topics to explore

    Browse all articles