# Install netmask with Homebrew, apt, dnf, Nix

IP address netmask generation utility. Version 2.5.0 via Homebrew; verified 2026-07-28. Also installable with debian: sudo apt install netmask.

## Install

```sh
sudo av install brew:netmask
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install netmask
```

  Evidence: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install netmask
```

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

- dnf (92%):

```sh
sudo dnf install netmask
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#netmask
```

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

## Package facts

- **Package key:** brew:netmask
- **Package manager:** Homebrew
- **Version:** 2.5.0
- **Source summary:** IP address netmask generation utility
- **Homepage:** <https://github.com/tlby/netmask>
- **Repository:** <https://github.com/tlby/netmask>
- **Last updated:** 2026-07-28T14:02:51+09:00
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- netmask (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 2.5.0
## Project history and usage

netmask is a tiny IPv4 network-mask formatting and range utility. The upstream README describes it as a handy tool for generating terse netmasks in common formats, cleaning up sloppy firewall rules, generalizing address ranges, and converting between netmask formats.

### Project history

The available public history is thin. The GitHub repository is small, with 18 commits shown when checked, and GitHub listed 2.5.0 as the latest release on 2025-07-27. The source tree includes traditional Unix packaging artifacts such as a man page, Texinfo, Autotools files, Debian metadata, and tests.

### Adoption history

Adoption is distro-tool level rather than ecosystem level. Debian packages it as `netmask` and describes it as a tiny program useful for firewalls, routers, and shell scripts; Homebrew packages version 2.5.0 and reported 247 installs over 365 days in its 2026-07-01 API output.

### How it is used

Package users run `netmask` when they need to turn address ranges into the smallest set of masks or convert between common address/netmask notations. Debian's package description explicitly calls out firewall and router work, plus use as a helper from shell scripts.

This is not a service and not a library in the package-manager sense. Its value is that it is faster and less error-prone than doing subnet arithmetic by hand while editing firewall rules or migration scripts.

### Why package nerds care

netmask is the kind of small C utility that package indexes keep because network admins occasionally need it and because it has a stable, well-bounded job. The history is not rich enough to justify a high-confidence origin story.

### Timeline

- 2025-07-27: GitHub listed 2.5.0 as the latest release.
- 2026-07-01: Homebrew formula API reported version 2.5.0 and 247 installs over 365 days.

### Related projects

- ipcalc
- gip
- firewall rule tooling

### Sources

- <https://formulae.brew.sh/api/formula/netmask.json>
- <https://github.com/tlby/netmask>
- <https://packages.debian.org/sid/net/netmask>


## Security Notes

No matching local secret-handling manifest was found for netmask. Nucleus package metadata is still published here so future coverage has a stable package URL.


## Other Package-Manager Records

- Debian apt - netmask - 2.4.4-4: normalized package name match | Debian stable package indexes: netmask from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | helps determine network masks | https://github.com/tlby/netmask
- Nix - netmask: normalized package name match | nixpkgs package indexes: pkgs/by-name/ne/netmask/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - netmask - 2.4.4-4build1: normalized package name match | Ubuntu 24.04 LTS package indexes: netmask from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | helps determine network masks | https://github.com/tlby/netmask
- dnf - netmask - 2.5.0-4.fc45: normalized package name match | Fedora Rawhide package metadata: netmask from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Utility for determining network masks | https://github.com/tlby/netmask


## Combined YAML source

View the package source record on GitHub. [combined/netmask.yml](https://github.com/mxcl/pkgdb/blob/main/combined/netmask.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
