# Install gawk with Homebrew, apk, chocolatey, apt, dnf, MacPorts, Nix, pacman, scoop, zypper

GNU awk utility. Version 5.4.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:gawk
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install gawk
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gawk
```

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

### Linux

- apk (92%):

```sh
sudo apk add gawk
```

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

- Debian apt (92%):

```sh
sudo apt install gawk
```

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

- dnf (92%):

```sh
sudo dnf install gawk
```

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

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

- pacman (92%):

```sh
sudo pacman -S gawk
```

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

- zypper (92%):

```sh
sudo zypper install gawk
```

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

### Windows

- Chocolatey (92%):

```sh
choco install gawk
```

  Evidence: Chocolatey community package catalog: gawk from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','flow-launcher'

- Scoop (92%):

```sh
scoop install main/gawk
```

  Evidence: Scoop official bucket manifest trees: bucket/gawk.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:gawk
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/gawk>
- **Version:** 5.4.0
- **Source summary:** GNU awk utility
- **Homepage:** <https://www.gnu.org/software/gawk/>
- **Repository:** <https://git.savannah.gnu.org/git/gawk.git>
- **Upstream docs:** <https://www.gnu.org/software/gawk/manual>
- **License:** GPL-3.0-or-later
- **Source archive:** <https://ftpmirror.gnu.org/gnu/gawk/gawk-5.4.0.tar.xz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- gawk (cli)
- gawk-5.4.0 (cli)
- gawkbug (cli)
- gawk (alias)
- gawk-5.4.0 (alias)
- gawkbug (alias)

## Dependencies

- gettext
- gmp
- mpfr
- readline

## Install behavior

- Post-install hook: not defined
- Caveats: GNU "awk" has been installed as "gawk". If you need to use it as "awk", you can add a "gnubin" directory to your PATH from your ~/.bashrc and/or ~/.zshrc like: PATH="$HOMEBREW_PREFIX/opt/gawk/libexec/gnubin:$PATH"
- 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.4.0
- Local data: ok
- Upstream repository: https://www.gnu.org/software/gawk/
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

GNU Awk, usually packaged as `gawk`, is the GNU implementation of the AWK text-processing language. It is both a POSIX-style command-line utility and a scripting language for scanning records, matching patterns, and running actions over structured text.

### Project history

AWK originated at Bell Labs and is named for Alfred Aho, Peter Weinberger, and Brian Kernighan. GNU Awk carries that language into the GNU system, implementing standard awk behavior along with GNU extensions, internationalization support, networking features, extension mechanisms, and extensive documentation.

### Adoption history

gawk became the default awk implementation in many GNU/Linux environments and is packaged across the major Unix-like package managers. Its broad package coverage reflects awk's status as part of the everyday Unix text-processing toolkit, used in shell scripts, build systems, log processing, reports, and one-liners.

### How it is used

Users commonly invoke `awk` or `gawk` with short programs such as pattern-action rules on the command line, or with script files for larger transformations. The GNU manual documents command-line invocation, regular expressions, fields, records, arrays, functions, internationalization, debugging, profiling, and compatibility modes.

### Why package nerds care

gawk is one of the canonical packages that makes a Unix userland feel complete. Package maintainers care about it because countless scripts assume an awk implementation, while GNU Awk specifically exposes GNU behavior that may differ from minimalist awks, mawk, BusyBox awk, or platform awk implementations.

### Timeline

- 1970s: AWK was created at Bell Labs by Aho, Weinberger, and Kernighan.
- 1980s: GNU Awk began as the GNU project's implementation of awk.
- 1990s-2000s: gawk expanded beyond traditional awk with GNU extensions and a comprehensive Texinfo manual.
- 2020s: gawk remains maintained through GNU and Savannah and widely packaged as the GNU awk utility.

### Related projects

- gawk is related to the original awk and nawk implementations, POSIX awk, mawk, BusyBox awk, and other GNU text-processing tools such as sed and grep. The GNU project hosts the official source repository on Savannah.

### Sources

- <https://git.savannah.gnu.org/git/gawk.git>
- <https://savannah.gnu.org/projects/gawk>
- <https://www.gnu.org/software/gawk/>
- <https://www.gnu.org/software/gawk/manual/gawk.html>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** gawk
- **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 - gawk - 1:5.2.1-2+b1: normalized package name match | Debian stable package indexes: gawk from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU awk, a pattern scanning and processing language | http://www.gnu.org/software/gawk/
- Nix - gawk: normalized package name match | nixpkgs package indexes: gawk from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - gawk - 1:5.2.1-2build3: normalized package name match | Ubuntu 24.04 LTS package indexes: gawk from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GNU awk, a pattern scanning and processing language | http://www.gnu.org/software/gawk/
- apk - gawk - 5.3.2-r2: normalized package name match | Alpine Linux edge package indexes: gawk from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | GNU awk pattern-matching language | https://www.gnu.org/software/gawk/gawk.html
- apk - gawk-doc - 5.3.2-r2: normalized package name match | Alpine Linux edge package indexes: gawk-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | GNU awk pattern-matching language (documentation) | https://www.gnu.org/software/gawk/gawk.html
- dnf - gawk - 5.4.0-3.fc45: normalized package name match | Fedora Rawhide package metadata: gawk from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | The GNU version of the AWK text processing utility | https://www.gnu.org/software/gawk/
- dnf - gawk-all-langpacks - 5.4.0-3.fc45: normalized package name match | Fedora Rawhide package metadata: gawk-all-langpacks from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Additional localisation files for gawk utility | https://www.gnu.org/software/gawk/
- dnf - gawk-devel - 5.4.0-3.fc45: normalized package name match | Fedora Rawhide package metadata: gawk-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Header file for gawk extensions development | https://www.gnu.org/software/gawk/
- dnf - gawk-doc - 5.4.0-3.fc45: normalized package name match | Fedora Rawhide package metadata: gawk-doc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Additional documentation for gawk utility | https://www.gnu.org/software/gawk/
- pacman - gawk - 5.4.0-1: normalized package name match | Arch Linux sync databases: gawk from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz | GNU version of awk | https://www.gnu.org/software/gawk/
- zypper - gawk - 5.4.0-1.1: normalized package name match | openSUSE Tumbleweed package metadata: gawk from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Domain-specific language for text processing | https://www.gnu.org/software/gawk/
- MacPorts - gawk: normalized package name match | MacPorts ports tree: lang/gawk/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - gawk: normalized package name match | Chocolatey community package catalog: gawk from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','flow-launcher'
- Scoop - main/gawk: normalized package name match | Scoop official bucket manifest trees: bucket/gawk.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Related links

- [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.
- [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.
- [crosstool-ng](https://www.automicvault.com/pkg/brew/crosstool-ng/) - Popular package that depends on this formula.
- [git-secret](https://www.automicvault.com/pkg/brew/git-secret/) - Popular package that depends on this formula.
- [pkgdiff](https://www.automicvault.com/pkg/brew/pkgdiff/) - Popular package that depends on this formula.
- [translate-shell](https://www.automicvault.com/pkg/brew/translate-shell/) - Popular package that depends on this formula.
- [txt2man](https://www.automicvault.com/pkg/brew/txt2man/) - Popular package that depends on this formula.
- [enscript](https://www.automicvault.com/pkg/brew/enscript/) - Shares av.db curated category or tags: cli, developer-tools, gnu, text-processing.
- [grep](https://www.automicvault.com/pkg/brew/grep/) - Shares av.db curated category or tags: cli, developer-tools, gnu, text-processing.
- [wdiff](https://www.automicvault.com/pkg/brew/wdiff/) - Shares av.db curated category or tags: cli, developer-tools, gnu, text-processing.
- [align](https://www.automicvault.com/pkg/brew/align/) - Shares av.db curated category or tags: cli, developer-tools, text-processing.
- [bsdconv](https://www.automicvault.com/pkg/brew/bsdconv/) - Shares av.db curated category or tags: cli, developer-tools, text-processing.
- [cconv](https://www.automicvault.com/pkg/brew/cconv/) - Shares av.db curated category or tags: cli, developer-tools, text-processing.
- [cmigemo](https://www.automicvault.com/pkg/brew/cmigemo/) - Shares av.db curated category or tags: cli, developer-tools, text-processing.
- [decasify](https://www.automicvault.com/pkg/brew/decasify/) - Shares av.db curated category or tags: cli, developer-tools, text-processing.
- [gnu-sed](https://www.automicvault.com/pkg/brew/gnu-sed/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, gnu, processing.

## Combined YAML source

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


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- 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
