Automic VaultAutomic Vault

brew

使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper 安装 zsh

查看 zsh 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install zsh

local Homebrew formula metadata

MacPorts已验证 · 94%
sudo port install zsh

MacPorts ports tree · shells/zsh/Portfile · 来源: api.github.com

Linux

Alpine Linux apk已验证 · 92%
sudo apk add zsh

Alpine Linux edge package indexes · zsh · 来源: dl-cdn.alpinelinux.org

Debian apt已验证 · 92%
sudo apt install zsh

Debian stable package indexes · zsh · 来源: deb.debian.org

Fedora dnf已验证 · 92%
sudo dnf install zsh

Fedora Rawhide package metadata · zsh · 来源: dl.fedoraproject.org

Nix已验证 · 92%
nix profile install nixpkgs#zsh

nixpkgs package indexes · pkgs/by-name/zs/zsh/package.nix · 来源: api.github.com

Arch Linux pacman已验证 · 92%
sudo pacman -S zsh

Arch Linux sync databases · zsh · 来源: geo.mirror.pkgbuild.com

openSUSE zypper已验证 · 92%
sudo zypper install zsh

openSUSE Tumbleweed package metadata · zsh · 来源: download.opensuse.org

概览

软件包摘要

UNIX shell (command interpreter)

命令和别名

  • zsh
  • zsh-5.9

历史

项目历史与用法

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.

项目历史

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.

采用历史

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.

使用方式

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`.

为什么软件包爱好者会关心

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.

时间线

  • 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.

安全态势

风险级别:yellow

doc example: shell runtime.

风险分类器

yellow 风险 · 高 置信度 · runtime

原因

  • doc example: shell runtime

信号

  • override:zsh

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。
  • 安装时包含 2 个运行时依赖。
  • 构建元数据列出 1 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

local files

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

Config paths the tool may read or write during local use.

Unix
~/.zshenv~/.zprofile~/.zshrc~/.zlogin~/.zlogout

Credential files

Credential-bearing paths to review before unattended agent runs.

Unix
~/.zshenv~/.zprofile~/.zshrc~/.zlogin~/.zlogout

可执行文件

已安装的可执行文件

命令类型暴露范围备注
zshcli全局可执行文件
zsh-5.9cli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-10
管理器版本5.9.1
管理器更新时间2026-06-26
本地数据OK
上游not checked
检测到的最新版本未检测到

https://www.zsh.org/

  • 信息Release/tag comparison is only available for GitHub repositories.https://www.zsh.org/none 置信度

安装元数据

软件包元数据

软件包键brew:zsh
版本5.9.1
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/zsh
主页https://www.zsh.org/
仓库https://sourceforge.net/p/zsh/code
上游文档https://zsh.sourceforge.io/Doc
许可证MIT-Modern-Variant AND GPL-2.0-only AND GPL-2.0-or-later AND ISC
源码归档https://downloads.sourceforge.net/project/zsh/zsh/5.9.1/zsh-5.9.1.tar.xz
最后更新2026-06-26T12:13:30-04:00
Pulseupdated
依赖ncurses, pcre2
构建依赖texinfo
Bottle可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namezsh
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Debian apt95%

zsh 5.9-8+b23

shell with lots of features

https://www.zsh.org/

sudo apt install zsh
  • Section: shells
  • Architecture: amd64
  • Source Package: zsh
  • 5 依赖
  • 4 可选依赖
  • normalized package name match
  • 匹配方式:Zsh
Debian stable package indexes · deb.debian.org · Debian stable package indexes: zsh from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

zsh-common 5.9-8

architecture independent files for Zsh

https://www.zsh.org/

sudo apt install zsh-common
  • Section: shells
  • Architecture: all
  • Source Package: zsh
  • 2 可选依赖
  • normalized package name match
  • 匹配方式:Zsh
Debian stable package indexes · deb.debian.org · Debian stable package indexes: zsh-common from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

zsh-dev 5.9-8+b23

shell with lots of features (development files)

https://www.zsh.org/

sudo apt install zsh-dev
  • Section: libdevel
  • Architecture: amd64
  • Source Package: zsh
  • 1 依赖
  • normalized package name match
  • 匹配方式:Zsh
Debian stable package indexes · deb.debian.org · Debian stable package indexes: zsh-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

zsh-doc 5.9-8

zsh documentation - info/HTML format

https://www.zsh.org/

sudo apt install zsh-doc
  • Section: doc
  • Architecture: all
  • Source Package: zsh
  • 1 依赖
  • normalized package name match
  • 匹配方式:Zsh
Debian stable package indexes · deb.debian.org · Debian stable package indexes: zsh-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

zsh-static 5.9-8+b23

shell with lots of features (static link)

https://www.zsh.org/

sudo apt install zsh-static
  • Section: shells
  • Architecture: amd64
  • Source Package: zsh
  • 1 依赖
  • 2 可选依赖
  • normalized package name match
  • 匹配方式:Zsh
Debian stable package indexes · deb.debian.org · Debian stable package indexes: zsh-static from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

zsh

nix profile install nixpkgs#zsh
  • normalized package name match
  • 匹配方式:Zsh
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/zs/zsh/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt95%

zsh 5.9-6ubuntu2

shell with lots of features

https://www.zsh.org/

sudo apt install zsh
  • Section: shells
  • Architecture: amd64
  • 5 依赖
  • 4 可选依赖
  • normalized package name match
  • 匹配方式:Zsh
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: zsh from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz
Ubuntu apt95%

zsh-common 5.9-6ubuntu2

architecture independent files for Zsh

https://www.zsh.org/

sudo apt install zsh-common
  • Section: shells
  • Architecture: all
  • Source Package: zsh
  • 2 可选依赖
  • normalized package name match
  • 匹配方式:Zsh
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: zsh-common from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz
Ubuntu apt95%

zsh-dev 5.9-6ubuntu2

shell with lots of features (development files)

https://www.zsh.org/

sudo apt install zsh-dev
  • Section: libdevel
  • Architecture: amd64
  • Source Package: zsh
  • 1 依赖
  • normalized package name match
  • 匹配方式:Zsh
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: zsh-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz
Ubuntu apt95%

zsh-doc 5.9-6ubuntu2

zsh documentation - info/HTML format

https://www.zsh.org/

sudo apt install zsh-doc
  • Section: doc
  • Architecture: all
  • Source Package: zsh
  • 1 依赖
  • normalized package name match
  • 匹配方式:Zsh
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: zsh-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz
Ubuntu apt95%

zsh-static 5.9-6ubuntu2

shell with lots of features (static link)

https://www.zsh.org/

sudo apt install zsh-static
  • Section: universe/shells
  • Architecture: amd64
  • Source Package: zsh
  • 1 依赖
  • 2 可选依赖
  • normalized package name match
  • 匹配方式:Zsh
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: zsh-static from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
apk95%

android-tools-zsh-completion 5.9-r7

Zsh completions for android-tools

https://www.zsh.org/

sudo apk add android-tools-zsh-completion
  • License: MIT-Modern-Variant AND GPL-2.0-only
  • Architecture: x86_64
  • Source Package: zsh
  • normalized package name match
  • 匹配方式:Zsh
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: android-tools-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

bzr-zsh-completion 5.9-r7

Zsh completions for bzr

https://www.zsh.org/

sudo apk add bzr-zsh-completion
  • License: MIT-Modern-Variant AND GPL-2.0-only
  • Architecture: x86_64
  • Source Package: zsh
  • normalized package name match
  • 匹配方式:Zsh
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: bzr-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

composer-zsh-completion 5.9-r7

Zsh completions for composer

https://www.zsh.org/

sudo apk add composer-zsh-completion
  • License: MIT-Modern-Variant AND GPL-2.0-only
  • Architecture: x86_64
  • Source Package: zsh
  • normalized package name match
  • 匹配方式:Zsh
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: composer-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

cvs-zsh-completion 5.9-r7

Zsh completions for cvs

https://www.zsh.org/

sudo apk add cvs-zsh-completion
  • License: MIT-Modern-Variant AND GPL-2.0-only
  • Architecture: x86_64
  • Source Package: zsh
  • normalized package name match
  • 匹配方式:Zsh
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: cvs-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

gcc-zsh-completion 5.9-r7

Zsh completions for gcc

https://www.zsh.org/

sudo apk add gcc-zsh-completion
  • License: MIT-Modern-Variant AND GPL-2.0-only
  • Architecture: x86_64
  • Source Package: zsh
  • normalized package name match
  • 匹配方式:Zsh
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: gcc-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

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