# Install nmap with Homebrew, apk, chocolatey, apt, dnf, MacPorts, Nix, pacman, scoop, winget

Port scanning utility for large networks. Version 7.99 via Homebrew; verified 2026-06-22.

## Install

```sh
sudo av install brew:nmap
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install nmap
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install nmap
```

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

### Linux

- apk (92%):

```sh
sudo apk add nmap
```

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

- Debian apt (92%):

```sh
sudo apt install ncat
```

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

- dnf (92%):

```sh
sudo dnf install nmap
```

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

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

- pacman (92%):

```sh
sudo pacman -S nmap
```

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

### Windows

- Chocolatey (92%):

```sh
choco install nmap
```

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

- Scoop (92%):

```sh
scoop install main/nmap
```

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

- winget (92%):

```sh
winget install --id Insecure.Nmap -e
```

  Evidence: Windows Package Manager source index: Insecure.Nmap from https://cdn.winget.microsoft.com/cache/source.msix

## Package facts

- **Package key:** brew:nmap
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/nmap>
- **Version:** 7.99
- **Source summary:** Port scanning utility for large networks
- **Homepage:** <https://nmap.org/>
- **Repository:** <https://svn.nmap.org/nmap>
- **Upstream docs:** <https://nmap.org/book/toc.html>
- **License:** LicenseRef-Homebrew-cannot-represent
- **Source archive:** <https://nmap.org/dist/nmap-7.99.tar.bz2>
- **Last updated:** 2026-06-22T14:05:38-07:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- ncat (cli)
- nmap (cli)
- nping (cli)
- ncat (alias)
- nmap (alias)
- nping (alias)

## Dependencies

- liblinear
- libssh2
- lua
- openssl@3
- pcre2
- python@3.14

## Build dependencies

- python-setuptools

## Uses from macOS

- libpcap

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 7.99
- Package-manager updated: 2026-06-22
- Local data: ok
- Upstream repository: https://nmap.org/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

Nmap, short for Network Mapper, is one of the defining open-source security and network-discovery tools. Gordon "Fyodor" Lyon released it in Phrack issue 51 on September 1, 1997 as a Linux-only port scanner of about 2,000 lines; it grew into a cross-platform scanner for host discovery, port scanning, version detection, OS detection, scripting, scan comparison, packet generation, and network troubleshooting.

### Project history

The official Nmap history highlights rapid early expansion: version 2.00 added OS detection on December 12, 1998; the first GUI appeared in April 1999; Windows support landed in December 2000; Mac OS X support and XML output arrived with Nmap 3.00 on July 31, 2002; and service/version detection was publicly released with Nmap 3.45 on September 16, 2003. The scan engine was rewritten as `ultra_scan` in 2004, raw Ethernet sending appeared in 2005, and the Nmap Scripting Engine arrived in 2006.

### Adoption history

Nmap's adoption is unusually broad for a security tool. The official guide describes millions of users worldwide, recognition by publications such as Linux Journal and InfoWorld, and repeated appearances in films. Its own timeline also notes security-community infrastructure: a public Subversion repository in 2006, Google Summer of Code participation, Zenmap integration, and the 2009 release of Ncat and Ndiff as companion tools.

### How it is used

Package nerds install Nmap not only for `nmap` itself but for the companion commands Homebrew ships: `ncat`, `ndiff`, and `nping`. Everyday workflows include `nmap -A -T4 host` for an aggressive inventory scan, targeted `-sV` service/version detection, `-O` OS detection, `-sn` ping sweeps, NSE scripts for protocol checks, `ncat` for socket work, and `ndiff` to compare repeated XML scans.

### Why package nerds care

Nmap is a canonical example of a CLI package whose upstream is bigger than a single binary: it carries data files, scripts, service probes, OS fingerprints, documentation, and multiple related tools. It is packaged almost everywhere, and Homebrew's API reported 14,039 installs in 30 days, 54,604 in 90 days, and 251,639 in 365 days when checked on July 1, 2026.

### Timeline

- 1997-09-01: first release in Phrack issue 51.
- 1998-12-12: Nmap 2.00 adds OS detection.
- 2000-12-07: first official Windows-capable version.
- 2002-07-31: Nmap 3.00 adds Mac OS X support, XML output, and uptime detection.
- 2003-09-16: service/version detection is publicly released.
- 2006-12-10: Nmap Scripting Engine debuts in Nmap 4.21ALPHA1.
- 2009-01-23: Ncat and Ndiff are added.
- 2026-07-01: Homebrew stable version is 7.99.

### Related projects

- Ncat
- Ndiff
- Nping
- Zenmap
- Npcap
- Nmap Scripting Engine

### Sources

- <https://formulae.brew.sh/api/formula/nmap.json>
- <https://nmap.org/book/history-future.html>
- <https://nmap.org/book/man-author.html>
- <https://nmap.org/book/man.html>
- <https://nmap.org/book/preface.html>
- <https://nmap.org/docs.html>


## Security Notes

network reconnaissance tool.

- **Geiger risk:** red / medium
- network reconnaissance tool

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** nmap
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Conflicts With:** cern-ndiff, ndiff
- **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 - ncat - 7.95+dfsg-3: normalized package name match | Debian stable package indexes: ncat from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | NMAP netcat reimplementation | https://nmap.org/
- Debian apt - ndiff - 7.95+dfsg-3: normalized package name match | Debian stable package indexes: ndiff from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | The Network Mapper - result compare utility | https://nmap.org/
- Debian apt - nmap - 7.95+dfsg-3: normalized package name match | Debian stable package indexes: nmap from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | The Network Mapper | https://nmap.org/
- Debian apt - nmap-common - 7.95+dfsg-3: normalized package name match | Debian stable package indexes: nmap-common from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Architecture independent files for nmap | https://nmap.org/
- Debian apt - zenmap - 7.95+dfsg-3: normalized package name match | Debian stable package indexes: zenmap from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | The Network Mapper Front End | https://nmap.org/
- Nix - nmap: normalized package name match | nixpkgs package indexes: pkgs/by-name/nm/nmap/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - ncat - 7.94+git20230807.3be01efb1+dfsg-3build2: normalized package name match | Ubuntu 24.04 LTS package indexes: ncat from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | NMAP netcat reimplementation | https://nmap.org/
- Ubuntu apt - ndiff - 7.94+git20230807.3be01efb1+dfsg-3build2: normalized package name match | Ubuntu 24.04 LTS package indexes: ndiff from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | The Network Mapper - result compare utility | https://nmap.org/
- Ubuntu apt - nmap - 7.94+git20230807.3be01efb1+dfsg-3build2: normalized package name match | Ubuntu 24.04 LTS package indexes: nmap from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | The Network Mapper | https://nmap.org/
- Ubuntu apt - nmap-common - 7.94+git20230807.3be01efb1+dfsg-3build2: normalized package name match | Ubuntu 24.04 LTS package indexes: nmap-common from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Architecture independent files for nmap | https://nmap.org/
- Ubuntu apt - zenmap - 7.94+git20230807.3be01efb1+dfsg-3build2: normalized package name match | Ubuntu 24.04 LTS package indexes: zenmap from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | The Network Mapper Front End | https://nmap.org/
- apk - nmap - 7.99-r0: normalized package name match | Alpine Linux edge package indexes: nmap from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | network exploration tool and security/port scanner | https://nmap.org
- apk - nmap-doc - 7.99-r0: normalized package name match | Alpine Linux edge package indexes: nmap-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | network exploration tool and security/port scanner (documentation) | https://nmap.org
- apk - nmap-ncat - 7.99-r0: normalized package name match | Alpine Linux edge package indexes: nmap-ncat from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | network exploration tool and security/port scanner (ncat tool) | https://nmap.org
- apk - nmap-nping - 7.99-r0: normalized package name match | Alpine Linux edge package indexes: nmap-nping from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | network exploration tool and security/port scanner (nping tool) | https://nmap.org
- apk - nmap-nselibs - 7.99-r0: normalized package name match | Alpine Linux edge package indexes: nmap-nselibs from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | network exploration tool and security/port scanner (nselibs) | https://nmap.org


## 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.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Security and crypto packages](https://www.automicvault.com/pkg/security-crypto-tools/) - Matched security, identity, cryptography, password, signing, or certificate metadata.
- [liblinear](https://www.automicvault.com/pkg/brew/liblinear/) - Runtime dependency declared by Homebrew.
- [lua](https://www.automicvault.com/pkg/brew/lua/) - Runtime dependency declared by Homebrew.
- [openssl@3](https://www.automicvault.com/pkg/brew/openssl-3/) - Runtime dependency declared by Homebrew.
- [pcre2](https://www.automicvault.com/pkg/brew/pcre2/) - Runtime dependency declared by Homebrew.
- [python@3.14](https://www.automicvault.com/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [asn](https://www.automicvault.com/pkg/brew/asn/) - Popular package that depends on this formula.
- [nb](https://www.automicvault.com/pkg/brew/nb/) - Popular package that depends on this formula.
- [rustscan](https://www.automicvault.com/pkg/brew/rustscan/) - Popular package that depends on this formula.
- [ike-scan](https://www.automicvault.com/pkg/brew/ike-scan/) - Shares av.db curated category or tags: cli, network-scanning, scanner, security.
- [masscan](https://www.automicvault.com/pkg/brew/masscan/) - Shares av.db curated category or tags: cli, network-scanning, port-scanner, security.
- [naabu](https://www.automicvault.com/pkg/brew/naabu/) - Shares av.db curated category or tags: cli, network-scanning, port-scanner, security.
- [synscan](https://www.automicvault.com/pkg/brew/synscan/) - Shares av.db curated category or tags: cli, network-scanning, port-scanner, security.
- [apkleaks](https://www.automicvault.com/pkg/brew/apkleaks/) - Shares av.db curated category or tags: cli, scanner, security.
- [bbot](https://www.automicvault.com/pkg/brew/bbot/) - Shares av.db curated category or tags: cli, scanner, security.
- [fierce](https://www.automicvault.com/pkg/brew/fierce/) - Shares av.db curated category or tags: cli, network-discovery, security.
- [gosec](https://www.automicvault.com/pkg/brew/gosec/) - Shares av.db curated category or tags: cli, scanner, security.
- [ncrack](https://www.automicvault.com/pkg/brew/ncrack/) - Security-sensitive metadata or terminology overlaps. Shared terms: cli, network, openssl, openssl-3, security.

## Combined YAML source

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