macOS
brew install bashlocal Homebrew formula metadata
sudo port install bashMacPorts ports tree · shells/bash/Portfile · 来源: api.github.com
安装
brew install bashlocal Homebrew formula metadata
sudo port install bashMacPorts ports tree · shells/bash/Portfile · 来源: api.github.com
sudo apk add bashAlpine Linux edge package indexes · bash · 来源: dl-cdn.alpinelinux.org
sudo dnf install bashFedora Rawhide package metadata · bash · 来源: dl.fedoraproject.org
nix profile install nixpkgs#bashnixpkgs package indexes · bash · 来源: raw.githubusercontent.com
sudo pacman -S bashArch Linux sync databases · bash · 来源: geo.mirror.pkgbuild.com
sudo zypper install bashopenSUSE Tumbleweed package metadata · bash · 来源: download.opensuse.org
概览
Bourne-Again SHell, a UNIX command interpreter
历史
GNU Bash, the Bourne-Again SHell, is the GNU Project's command language interpreter and one of the defining packages of Unix-like systems. It is both an interactive shell and a scripting language, sitting in the path between POSIX `sh`, the historical Bourne shell, GNU userlands, Linux distributions, macOS compatibility, and modern CI automation.
The GNU Bash manual describes Bash as the shell for the GNU operating system and explains that its name is a pun on the Bourne shell, the traditional Unix shell written by Stephen Bourne. Chet Ramey's Bash information page describes Bash as a complete implementation of the IEEE POSIX and Open Group shell specification with interactive command-line editing, job control, history substitution, brace expansion, and many other features.
Bash became the practical GNU answer to `/bin/sh`: compatible enough for shell scripts, featureful enough for interactive use, and free software under the GNU General Public License. The official Bash page identifies the Savannah repository as the main Git repository and the GNU FTP area as the archive for previous releases.
Bash history is also readline history. The package's interactive identity is built around line editing, history, completion, job control, shell variables, functions, and startup files. The official manual's startup-file section documents the familiar split between login files such as `~/.bash_profile`, `~/.bash_login`, and `~/.profile`, interactive non-login `~/.bashrc`, and non-interactive `BASH_ENV`.
Bash became standard infrastructure across GNU/Linux distributions. Chet Ramey's distribution notes state directly that Bash is the standard shell on GNU/Linux systems, and the batch input shows it packaged across Alpine, Homebrew, Debian, Fedora/DNF, MacPorts, Nix, Arch, Ubuntu, and openSUSE.
Its adoption also spread beyond GNU/Linux. The official Bash page documents Bash in BSD ports/packages, macOS as `/bin/sh` and `/bin/bash` beginning with Jaguar/Mac OS X 10.2, Solaris, AIX, HP-UX, Minix, Cygwin, and Windows Subsystem for Linux environments. The same page notes Apple's long-lived Bash 3.2 choice, which made Homebrew and MacPorts important for users who wanted newer Bash on macOS.
Bash also became a de facto automation substrate. Makefiles, configure scripts, release scripts, CI pipelines, container entrypoints, package build recipes, dotfiles, and system administration scripts often assume either POSIX shell behavior or Bash-specific extensions. That ubiquity is why a shell package can be both boring and critical.
Users run Bash interactively as a login shell or terminal shell, execute scripts with `bash script`, use it as a POSIX-like `/bin/sh` implementation when invoked that way, and customize sessions through startup files. The manual documents command invocation, startup-file behavior, variables, builtins, functions, shell expansions, redirection, job control, completion, and POSIX mode.
For package managers, Bash is also build infrastructure. Formulae, ports, distro build scripts, test harnesses, and upstream install scripts routinely rely on it. Installing Bash from Homebrew on macOS is a common way to get a newer GNU Bash than Apple's system `/bin/bash`, while Linux packages keep it in the base system dependency graph.
Bash is package-nerd bedrock. It is not just a package you install; it is a package many other packages assume exists during configure, build, test, install, and runtime scripting. A broken Bash upgrade can affect interactive users, init scripts, CI jobs, package formulas, and build systems all at once.
It is also one of the clearest examples of interface stability as a cultural contract. Bash has POSIX compatibility, decades of scripts, GNU extensions, platform-specific patches, startup-file expectations, and security-sensitive parsing behavior. Package maintainers care about patch levels, default paths, shell registration, codesigning or sandbox constraints on macOS, and whether `/bin/sh` points to Bash, dash, or another shell.
Historically, Bash carries the GNU/Linux story in one executable: free replacement shell, interactive convenience layer, script language, and distribution default. It is why package nerds still argue about Bashisms, POSIX portability, shebangs, `/usr/bin/env bash`, and whether a script really needed Bash in the first place.
安全态势
doc example: shell runtime.
yellow 风险 · 高 置信度 · runtime
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
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.
Config paths the tool may read or write during local use.
~/.bashrc~/.bash_profile~/.bash_login~/.profileCredential-bearing paths to review before unattended agent runs.
~/.bashrc~/.bash_profile~/.bash_login~/.profile可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
bash | cli | 全局可执行文件 | |
bashbug | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://www.gnu.org/software/bash/
安装元数据
| 软件包键 | brew:bash |
|---|---|
| 版本 | 5.3.15 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/bash |
| 主页 | https://www.gnu.org/software/bash/ |
| 仓库 | https://git.savannah.gnu.org/git/bash.git |
| 上游文档 | https://www.gnu.org/software/bash |
| 许可证 | GPL-3.0-or-later |
| 源码归档 | https://ftpmirror.gnu.org/gnu/bash/bash-5.3.tar.gz |
| 最后更新 | 2026-06-11T00:44:57Z |
| Pulse | updated |
| 依赖 | gettext, ncurses, readline |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
| 注意事项 | DEFAULT_LOADABLE_BUILTINS_PATH: $HOMEBREW_PREFIX/lib/bash:/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | bash |
| 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 |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
bash 5.2.37-2+b9
GNU Bourne Again SHell
http://tiswww.case.edu/php/chet/bash/bashtop.html
sudo apt install bashbash-builtins 5.2.37-2+b9
Bash loadable builtins - headers & examples
http://tiswww.case.edu/php/chet/bash/bashtop.html
sudo apt install bash-builtinsbash-doc 5.2.37-2
Documentation and examples for the GNU Bourne Again SHell
http://tiswww.case.edu/php/chet/bash/bashtop.html
sudo apt install bash-docbash-static 5.2.37-2+b9
GNU Bourne Again SHell (static version)
http://tiswww.case.edu/php/chet/bash/bashtop.html
sudo apt install bash-staticbash
nix profile install nixpkgs#bashbash 5.2.21-2ubuntu4
GNU Bourne Again SHell
http://tiswww.case.edu/php/chet/bash/bashtop.html
sudo apt install bashbash-builtins 5.2.21-2ubuntu4
Bash loadable builtins - headers & examples
http://tiswww.case.edu/php/chet/bash/bashtop.html
sudo apt install bash-builtinsbash-doc 5.2.21-2ubuntu4
Documentation and examples for the GNU Bourne Again SHell
http://tiswww.case.edu/php/chet/bash/bashtop.html
sudo apt install bash-docbash-static 5.2.21-2ubuntu4
GNU Bourne Again SHell (static version)
http://tiswww.case.edu/php/chet/bash/bashtop.html
sudo apt install bash-staticbash 5.3.9-r1
The GNU Bourne Again shell
https://www.gnu.org/software/bash/bash.html
sudo apk add bashbash-dbg 5.3.9-r1
The GNU Bourne Again shell (debug symbols)
https://www.gnu.org/software/bash/bash.html
sudo apk add bash-dbgbash-dev 5.3.9-r1
The GNU Bourne Again shell (development files)
https://www.gnu.org/software/bash/bash.html
sudo apk add bash-devbash-doc 5.3.9-r1
The GNU Bourne Again shell (documentation)
https://www.gnu.org/software/bash/bash.html
sudo apk add bash-docbash 5.3.9-3.fc44
The GNU Bourne Again shell
https://www.gnu.org/software/bash
sudo dnf install bashbash-devel 5.3.9-3.fc44
Development headers for bash
https://www.gnu.org/software/bash
sudo dnf install bash-develbash-doc 5.3.9-3.fc44
Documentation files for bash
https://www.gnu.org/software/bash
sudo dnf install bash-doc来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.