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

Bourne-Again SHell, a UNIX command interpreter. Version 5.3.15 via Homebrew; verified 2026-06-11.

## Install

```sh
sudo av install brew:bash
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install bash
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install bash
```

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

### Linux

- apk (92%):

```sh
sudo apk add bash
```

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

- Debian apt (92%):

```sh
sudo apt install bash
```

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

- dnf (92%):

```sh
sudo dnf install bash
```

  Evidence: Fedora Rawhide package metadata: bash 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#bash
```

  Evidence: nixpkgs package indexes: bash from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S bash
```

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

- zypper (92%):

```sh
sudo zypper install bash
```

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

## Package facts

- **Package key:** brew:bash
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/bash>
- **Version:** 5.3.15
- **Source summary:** Bourne-Again SHell, a UNIX command interpreter
- **Homepage:** <https://www.gnu.org/software/bash/>
- **Repository:** <https://git.savannah.gnu.org/git/bash.git>
- **Upstream docs:** <https://www.gnu.org/software/bash>
- **License:** GPL-3.0-or-later
- **Source archive:** <https://ftpmirror.gnu.org/gnu/bash/bash-5.3.tar.gz>
- **Last updated:** 2026-06-11T00:44:57Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- bash (cli)
- bashbug (cli)
- bash (alias)
- bashbug (alias)

## Dependencies

- gettext
- ncurses
- readline

## Install behavior

- Post-install hook: not defined
- Caveats: 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:.
- 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.3.15
- Package-manager updated: 2026-06-11
- Local data: ok
- Upstream repository: https://www.gnu.org/software/bash/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

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.

### Project history

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

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 1980s: Bash is created as the GNU Project's Bourne-Again SHell, a free software shell in the Bourne shell lineage.
- 1994: GNU FTP archive lists Bash 1.14-era release artifacts.
- 1996: GNU FTP archive lists Bash 2.0.
- 2004: GNU FTP archive lists Bash 3.0.
- 2006: Bash 3.2 appears; this line later becomes important on macOS.
- 2009: GNU FTP archive lists Bash 4.0.
- 2019: GNU FTP archive lists Bash 5.0.
- 2022: GNU FTP archive lists Bash 5.2.
- 2025: GNU FTP archive lists Bash 5.3.
- 2026: Chet Ramey's Bash page identifies Bash 5.3 as the current version and points to the Savannah Git repository for patched current sources.

### Related projects

- Directly related shells and standards include the Bourne shell, POSIX `sh`, ksh, csh, zsh, dash, and fish. Bash is also tightly connected to GNU Readline, GNU coreutils-era shell scripting, Autoconf-style configure scripts, ShellCheck, shfmt, and the large ecosystem of Bash completion packages.

### Sources

- Official Bash information page describes Bash as the GNU Project's Bourne Again SHell, a POSIX/Open Group shell implementation with editing, job control, history substitution, brace expansion, GPL licensing, current version, repository, release archives, and distribution notes.
- Official Bash manual documents the Bourne-Again SHell name, GNU shell role, invocation, startup files, `~/.bashrc`, login files, and `BASH_ENV`.
- Official GNU FTP archive lists historical Bash release artifacts from 1.14, 2.0, 3.x, 4.x, 5.0, 5.1, 5.2, and 5.3.
- input.source_facts.package-manager lists broad package-manager coverage across Linux distributions, BSD-adjacent package systems, Homebrew, MacPorts, and Nix.


## 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: ~/.bashrc, ~/.bash_profile, ~/.bash_login, ~/.profile

## Credential files

- Unix: ~/.bashrc, ~/.bash_profile, ~/.bash_login, ~/.profile
## Source Database Details

- **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:** head, stable

## Other Package-Manager Records

- Debian apt - bash - 5.2.37-2+b9: normalized package name match | Debian stable package indexes: bash from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU Bourne Again SHell | http://tiswww.case.edu/php/chet/bash/bashtop.html
- Debian apt - bash-builtins - 5.2.37-2+b9: normalized package name match | Debian stable package indexes: bash-builtins from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Bash loadable builtins - headers & examples | http://tiswww.case.edu/php/chet/bash/bashtop.html
- Debian apt - bash-doc - 5.2.37-2: normalized package name match | Debian stable package indexes: bash-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Documentation and examples for the GNU Bourne Again SHell | http://tiswww.case.edu/php/chet/bash/bashtop.html
- Debian apt - bash-static - 5.2.37-2+b9: normalized package name match | Debian stable package indexes: bash-static from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU Bourne Again SHell (static version) | http://tiswww.case.edu/php/chet/bash/bashtop.html
- Nix - bash: normalized package name match | nixpkgs package indexes: bash from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - bash - 5.2.21-2ubuntu4: normalized package name match | Ubuntu 24.04 LTS package indexes: bash from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GNU Bourne Again SHell | http://tiswww.case.edu/php/chet/bash/bashtop.html
- Ubuntu apt - bash-builtins - 5.2.21-2ubuntu4: normalized package name match | Ubuntu 24.04 LTS package indexes: bash-builtins from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Bash loadable builtins - headers & examples | http://tiswww.case.edu/php/chet/bash/bashtop.html
- Ubuntu apt - bash-doc - 5.2.21-2ubuntu4: normalized package name match | Ubuntu 24.04 LTS package indexes: bash-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Documentation and examples for the GNU Bourne Again SHell | http://tiswww.case.edu/php/chet/bash/bashtop.html
- Ubuntu apt - bash-static - 5.2.21-2ubuntu4: normalized package name match | Ubuntu 24.04 LTS package indexes: bash-static from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GNU Bourne Again SHell (static version) | http://tiswww.case.edu/php/chet/bash/bashtop.html
- apk - bash - 5.3.9-r1: normalized package name match | Alpine Linux edge package indexes: bash from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The GNU Bourne Again shell | https://www.gnu.org/software/bash/bash.html
- apk - bash-dbg - 5.3.9-r1: normalized package name match | Alpine Linux edge package indexes: bash-dbg from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The GNU Bourne Again shell (debug symbols) | https://www.gnu.org/software/bash/bash.html
- apk - bash-dev - 5.3.9-r1: normalized package name match | Alpine Linux edge package indexes: bash-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The GNU Bourne Again shell (development files) | https://www.gnu.org/software/bash/bash.html
- apk - bash-doc - 5.3.9-r1: normalized package name match | Alpine Linux edge package indexes: bash-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The GNU Bourne Again shell (documentation) | https://www.gnu.org/software/bash/bash.html
- dnf - bash - 5.3.9-3.fc44: normalized package name match | Fedora Rawhide package metadata: bash from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | The GNU Bourne Again shell | https://www.gnu.org/software/bash
- dnf - bash-devel - 5.3.9-3.fc44: normalized package name match | Fedora Rawhide package metadata: bash-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development headers for bash | https://www.gnu.org/software/bash
- dnf - bash-doc - 5.3.9-3.fc44: normalized package name match | Fedora Rawhide package metadata: bash-doc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Documentation files for bash | https://www.gnu.org/software/bash


## 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.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [gettext](https://www.automicvault.com/pkg/brew/gettext/) - Runtime dependency declared by Homebrew.
- [ncurses](https://www.automicvault.com/pkg/brew/ncurses/) - Runtime dependency declared by Homebrew.
- [asn](https://www.automicvault.com/pkg/brew/asn/) - Popular package that depends on this formula.
- [autoenv](https://www.automicvault.com/pkg/brew/autoenv/) - Popular package that depends on this formula.
- [backupninja](https://www.automicvault.com/pkg/brew/backupninja/) - Popular package that depends on this formula.
- [bash-completion@2](https://www.automicvault.com/pkg/brew/bash-completion-2/) - Popular package that depends on this formula.
- [bashdb](https://www.automicvault.com/pkg/brew/bashdb/) - Popular package that depends on this formula.
- [crosstool-ng](https://www.automicvault.com/pkg/brew/crosstool-ng/) - Popular package that depends on this formula.
- [direnv](https://www.automicvault.com/pkg/brew/direnv/) - Popular package that depends on this formula.
- [emojify](https://www.automicvault.com/pkg/brew/emojify/) - Popular package that depends on this formula.
- [dash-shell](https://www.automicvault.com/pkg/brew/dash-shell/) - Shares av.db curated category or tags: cli, command-interpreter, shell, system, unix.
- [brush](https://www.automicvault.com/pkg/brew/brush/) - Shares av.db curated category or tags: cli, command-interpreter, shell, system.
- [tcsh](https://www.automicvault.com/pkg/brew/tcsh/) - Shares av.db curated category or tags: cli, shell, system, unix.
- [bashish](https://www.automicvault.com/pkg/brew/bashish/) - Shares av.db curated category or tags: cli, shell, system.
- [elvish](https://www.automicvault.com/pkg/brew/elvish/) - Shares av.db curated category or tags: cli, shell, system.
- [hstr](https://www.automicvault.com/pkg/brew/hstr/) - Shares av.db curated category or tags: cli, shell, system.
- [murex](https://www.automicvault.com/pkg/brew/murex/) - Shares av.db curated category or tags: cli, shell, system.
- [nsh](https://www.automicvault.com/pkg/brew/nsh/) - Shares av.db curated category or tags: cli, shell, system.
- [coreutils](https://www.automicvault.com/pkg/brew/coreutils/) - Local package facts share a topical domain. Shared terms: cli, gnu, shell, system.
- [gnu-tar](https://www.automicvault.com/pkg/brew/gnu-tar/) - Local package facts share a topical domain. Shared terms: cli, gnu, system, unix.
- [cpio](https://www.automicvault.com/pkg/brew/cpio/) - Local package facts share a topical domain. Shared terms: cli, gnu, system.

## Combined YAML source

View the package source record on GitHub. [combined/bash.yml](https://github.com/automic-vault/db/blob/main/combined/bash.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
