# Install nmap on Windows, macOS and Linux

Network mapper for host discovery, port scanning and service detection.

Nmap is the standard network scanner. It finds the hosts on a network, the ports open on them, and the software and version behind each port. Its scripting engine adds hundreds of further checks.

> nmap sends traffic to its target. Only use it on systems you own or have written permission to test.

## How to install nmap

```
ot install nmap
```

ot uses nmap from your system's package manager. If it is not installed yet, ot shows the `winget`, `brew` or `apt` command and asks before running it. A Docker image is available as well: `ot install nmap --method docker`.

If you do not have ot yet:

macOS and Linux:

```
curl -fsSL https://otinstaller.com/install.sh | sh
```

Windows (PowerShell):

```
irm https://otinstaller.com/install.ps1 | iex
```

Current version: 0.3.0. Both scripts verify the download against its [SHA-256 checksum](https://otinstaller.com/releases/v0.3.0/checksums.txt) before installing.

## How to use nmap

Arguments after the tool's name go straight to nmap.

Scan the common ports and identify the services.

```
ot run nmap -sV example.com
```

Find the live hosts in a range without scanning ports.

```
ot run nmap -sn 192.0.2.0/24
```

Scan all 65,535 ports and save the result in every format.

```
ot run nmap -p- -T4 -oA scan example.com
```

`ot run nmap --help` lists every option.

An AI agent can run nmap too: `ot mcp` serves it over the Model Context Protocol, once the server is started with `--allow-active`. See [OSINT with AI agents](https://otinstaller.com/mcp/).

## nmap licence, platforms and versions

- Project: https://nmap.org
- Licence: NPSL
- Runs on: Windows, macOS and Linux
- Takes: ip, domain
- Categories: network, ports, recon
- Sends traffic to the target: yes
- System package: through apk, apt, brew, choco, dnf, pacman, scoop and winget
- Docker image: instrumentisto/nmap, with --method docker

## Questions about nmap

### How do I install nmap on Windows?

Open PowerShell and install ot with `irm https://otinstaller.com/install.ps1 | iex`. Then run `ot install nmap`. ot installs nmap through winget, Scoop or Chocolatey, after showing you the command.

### Is nmap free?

Yes. nmap is open source, released under the NPSL licence. ot, which installs it, is free under the Apache 2.0 licence.

### How do I update or remove nmap?

nmap is a system package, so update and uninstall it with your package manager. `ot remove nmap` only makes ot forget it and never uninstalls a system package.

### Do I need permission to use nmap?

Yes, for any system that is not your own. nmap sends traffic to its target, so use it only on systems you own or have written permission to test. ot shows this reminder before the first run, and its MCP server refuses nmap unless started with `--allow-active`.

## Tools related to nmap

- [naabu](https://otinstaller.com/tools/naabu/): Fast port scanner for finding open ports on hosts.
- [asnmap](https://otinstaller.com/tools/asnmap/): Map an organisation, domain or IP to its ASNs and network ranges.
- [masscan](https://otinstaller.com/tools/masscan/): Internet-scale TCP port scanner.
- [amass](https://otinstaller.com/tools/amass/): In-depth attack surface mapping and subdomain discovery from many data sources.
- [bbot](https://otinstaller.com/tools/bbot/): Recursive OSINT automation: subdomains, emails, web and cloud findings in one run.
- [cdncheck](https://otinstaller.com/tools/cdncheck/): Identify the CDN, cloud provider or WAF in front of an IP or domain.

More: [Networks and hosts](https://otinstaller.com/osint-tools/networks/).
