# Install zsh with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper

UNIX shell (command interpreter). Version 5.9.1 via Homebrew; verified 2026-06-26.

## Install

```sh
sudo av install brew:zsh
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install zsh
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install zsh
```

  Evidence: MacPorts ports tree: shells/zsh/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add android-tools-zsh-completion
```

  Evidence: Alpine Linux edge package indexes: android-tools-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install zsh
```

  Evidence: Debian stable package indexes: zsh from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install zsh
```

  Evidence: Fedora Rawhide package metadata: zsh from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#zsh
```

  Evidence: nixpkgs package indexes: pkgs/by-name/zs/zsh/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S zsh
```

  Evidence: Arch Linux sync databases: zsh from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install zsh
```

  Evidence: openSUSE Tumbleweed package metadata: zsh from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:zsh
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/zsh>
- **Version:** 5.9.1
- **Source summary:** UNIX shell (command interpreter)
- **Homepage:** <https://www.zsh.org/>
- **Repository:** <https://sourceforge.net/p/zsh/code>
- **Upstream docs:** <https://zsh.sourceforge.io/Doc>
- **License:** MIT-Modern-Variant AND GPL-2.0-only AND GPL-2.0-or-later AND ISC
- **Source archive:** <https://downloads.sourceforge.net/project/zsh/zsh/5.9.1/zsh-5.9.1.tar.xz>
- **Last updated:** 2026-06-26T12:13:30-04:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- zsh (cli)
- zsh-5.9 (cli)
- zsh (alias)
- zsh-5.9 (alias)

## Dependencies

- ncurses
- pcre2

## Build dependencies

- texinfo

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 5.9.1
- Package-manager updated: 2026-06-26
- Local data: ok
- Upstream repository: https://www.zsh.org/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

Zsh is one of the major Unix command interpreters: Bourne-like enough for daily shell work, but famous for interactive features such as programmable completion, spelling correction, glob qualifiers, prompt expansion, modules, line editing, and extensive startup-file control.

### Project history

Zsh was originally written by Paul Falstad while he was a Princeton student, and the official FAQ preserves the name origin as 'Z shell' after Yale professor Zhong Shao. The project started around 1990 and entered the public Unix shell ecosystem in the early 1990s as a more featureful interactive shell than sh, csh, and ksh users typically had by default.

The shell matured through the 1990s with mailing-list-driven development, a large manual, and a compatibility stance that mixed Bourne-shell scripting with deliberately non-minimal interactive features. The official documentation still reflects that breadth: shell grammar, parameters, expansion, completion, modules, ZLE widgets, TCP helpers, calendar functions, and many option switches are documented as first-class parts of the system.

The 4.x series established zsh as a stable power-user shell, while the 5.x series modernized a codebase already common on Unix-like systems. The official news page records zsh 5.0.0 in 2012 and zsh 5.9 in 2022, showing a project that is conservative in release cadence but still maintained.

Apple's macOS Catalina changed zsh's public profile. In 2019 Apple documented that the default interactive shell changed from bash to zsh, turning a shell long associated with Unix enthusiasts into the out-of-box shell for new macOS user accounts.

### Adoption history

Before the macOS switch, zsh adoption was strongest among Unix developers, sysadmins, and shell customizers who valued completion and prompt control. Frameworks such as Oh My Zsh later made that culture visible by collecting themes, plugins, and conventions around `.zshrc` customization.

After macOS Catalina, zsh became a default shell for a large population of developers using Macs. That did not make every user a zsh power user, but it changed packaging expectations: plugins, completions, prompt themes, history tools, and shell integrations increasingly treated zsh as a baseline target next to bash.

Distribution packaging is broad. The input package facts list zsh across Homebrew, Debian, Ubuntu, Fedora, Arch, openSUSE, MacPorts, Nix, and Alpine-related packages, reflecting its role as infrastructure rather than a niche optional tool.

### How it is used

Interactive users configure zsh through its startup-file sequence: `.zshenv`, `.zprofile`, `.zshrc`, `.zlogin`, and `.zlogout`. `.zshrc` is the common home for aliases, prompt setup, completion initialization, key bindings, plugin loading, and history behavior.

Developers use zsh as a login shell, an interactive command interpreter, and sometimes a scripting language when zsh-specific expansion, arrays, globbing, or modules are useful. Its completion system is a major practical draw: package managers and CLIs often ship zsh completion definitions because zsh users expect rich argument completion.

The shell is also the substrate for a large plugin ecosystem: prompt frameworks, autosuggestions, syntax highlighting, fuzzy history, directory jumping, and language-toolchain helpers are commonly loaded from `.zshrc`.

### Why package nerds care

zsh is package-nerd royalty because it is both a package and a platform for other packages. A package database can list zsh as a command interpreter, but its real ecosystem includes completions, plugins, prompt themes, framework packages, and tools that exist only because zsh's extension points are useful.

It is also a clean example of how defaults change package importance. zsh was already old and respected before macOS Catalina; Apple's default-shell switch made it newly central to developer workstations, Homebrew instructions, dotfile repos, and shell-plugin packaging.

For curation, zsh should be connected not just to shells such as bash, ksh, fish, and tcsh, but also to package-manager completion systems and interactive terminal UX tools.

### Timeline

- 1990: Paul Falstad begins the shell that becomes zsh.
- 1990s: zsh develops as a feature-rich Bourne-style Unix shell with programmable completion and ZLE editing.
- 2009: Oh My Zsh is created, helping popularize plugin-and-theme based zsh customization.
- 2012-07-24: zsh 5.0.0 is released, according to the official zsh news archive.
- 2019-10-07: macOS Catalina is released, and Apple documents zsh as the default shell for new user accounts.
- 2022-05-14: zsh 5.9 is released, according to the official zsh news archive.

### Related projects

- Related projects include bash, ksh, tcsh, fish, Oh My Zsh, Prezto, antigen, zinit, zplug, starship, powerlevel10k, zsh-completions, zsh-autosuggestions, zsh-syntax-highlighting, and zsh-history-substring-search.

### Sources

- <https://github.com/ohmyzsh/ohmyzsh>
- <https://sourceforge.net/p/zsh/code/>
- <https://support.apple.com/en-us/102360>
- <https://www.zsh.org/>
- <https://zsh.sourceforge.io/Doc/>
- <https://zsh.sourceforge.io/FAQ/zshfaq01.html>
- <https://zsh.sourceforge.io/News/>


## Security Notes

doc example: shell runtime.

- **Geiger risk:** yellow / high
- doc example: shell runtime


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.zshenv, ~/.zprofile, ~/.zshrc, ~/.zlogin, ~/.zlogout

## Credential files

- Unix: ~/.zshenv, ~/.zprofile, ~/.zshrc, ~/.zlogin, ~/.zlogout
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** zsh
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - zsh - 5.9-8+b23: normalized package name match | Debian stable package indexes: zsh from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | shell with lots of features | https://www.zsh.org/
- Debian apt - zsh-common - 5.9-8: normalized package name match | Debian stable package indexes: zsh-common from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | architecture independent files for Zsh | https://www.zsh.org/
- Debian apt - zsh-dev - 5.9-8+b23: normalized package name match | Debian stable package indexes: zsh-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | shell with lots of features (development files) | https://www.zsh.org/
- Debian apt - zsh-doc - 5.9-8: normalized package name match | Debian stable package indexes: zsh-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | zsh documentation - info/HTML format | https://www.zsh.org/
- Debian apt - zsh-static - 5.9-8+b23: normalized package name match | Debian stable package indexes: zsh-static from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | shell with lots of features (static link) | https://www.zsh.org/
- Nix - zsh: normalized package name match | nixpkgs package indexes: pkgs/by-name/zs/zsh/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - zsh - 5.9-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: zsh from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | shell with lots of features | https://www.zsh.org/
- Ubuntu apt - zsh-common - 5.9-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: zsh-common from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | architecture independent files for Zsh | https://www.zsh.org/
- Ubuntu apt - zsh-dev - 5.9-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: zsh-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | shell with lots of features (development files) | https://www.zsh.org/
- Ubuntu apt - zsh-doc - 5.9-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: zsh-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | zsh documentation - info/HTML format | https://www.zsh.org/
- Ubuntu apt - zsh-static - 5.9-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: zsh-static from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | shell with lots of features (static link) | https://www.zsh.org/
- apk - android-tools-zsh-completion - 5.9-r7: normalized package name match | Alpine Linux edge package indexes: android-tools-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Zsh completions for android-tools | https://www.zsh.org/
- apk - bzr-zsh-completion - 5.9-r7: normalized package name match | Alpine Linux edge package indexes: bzr-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Zsh completions for bzr | https://www.zsh.org/
- apk - composer-zsh-completion - 5.9-r7: normalized package name match | Alpine Linux edge package indexes: composer-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Zsh completions for composer | https://www.zsh.org/
- apk - cvs-zsh-completion - 5.9-r7: normalized package name match | Alpine Linux edge package indexes: cvs-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Zsh completions for cvs | https://www.zsh.org/
- apk - gcc-zsh-completion - 5.9-r7: normalized package name match | Alpine Linux edge package indexes: gcc-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Zsh completions for gcc | https://www.zsh.org/


## Related links

- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [ncurses](https://www.automicvault.com/pkg/brew/ncurses/) - Runtime dependency declared by Homebrew.
- [pcre2](https://www.automicvault.com/pkg/brew/pcre2/) - Runtime dependency declared by Homebrew.
- [texinfo](https://www.automicvault.com/pkg/brew/texinfo/) - Build dependency declared by Homebrew.
- [fizsh](https://www.automicvault.com/pkg/brew/fizsh/) - Popular package that depends on this formula.
- [zshdb](https://www.automicvault.com/pkg/brew/zshdb/) - Popular package that depends on this formula.
- [fish](https://www.automicvault.com/pkg/brew/fish/) - Shares av.db curated category or tags: cli, developer-tools, scripting, shell, unix.
- [bar](https://www.automicvault.com/pkg/brew/bar/) - Shares av.db curated category or tags: cli, developer-tools, scripting, shell.
- [shc](https://www.automicvault.com/pkg/brew/shc/) - Shares av.db curated category or tags: cli, developer-tools, shell, unix.
- [xonsh](https://www.automicvault.com/pkg/brew/xonsh/) - Shares av.db curated category or tags: cli, developer-tools, scripting, shell.
- [aliae](https://www.automicvault.com/pkg/brew/aliae/) - Shares av.db curated category or tags: cli, developer-tools, shell.
- [checkbashisms](https://www.automicvault.com/pkg/brew/checkbashisms/) - Shares av.db curated category or tags: cli, developer-tools, shell.
- [desk](https://www.automicvault.com/pkg/brew/desk/) - Shares av.db curated category or tags: cli, developer-tools, shell.
- [empty](https://www.automicvault.com/pkg/brew/empty/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, scripting, shell.
- [xml-coreutils](https://www.automicvault.com/pkg/brew/xml-coreutils/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, shell.

## Combined YAML source

View the package source record on GitHub. [combined/zsh.yml](https://github.com/automic-vault/db/blob/main/combined/zsh.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
