# Nmap

> Network scanner for host discovery, port scanning, service and OS detection, with a scripting engine (NSE) for extra checks.

Stars: 13.9k · Language: C · Categories: Network

- Repository: https://github.com/nmap/nmap
- Website: https://svn.nmap.org/
- Page: https://www.trmn.sh/tools/nmap

## Install

- Build from source: `./configure`
- Build from source: `make`
- Build from source: `make install`

## Overview

Nmap (Network Mapper) is a command-line network scanner. Given hosts, ranges or CIDR blocks, it finds which machines are up, which ports are open, and what is listening on them. It is a standard tool for network inventory, auditing and security testing.

The common workflow builds up from simple to detailed scans. `nmap 192.168.1.0/24` checks the most common ports across a subnet, `-p` picks ports, `-sV` probes open ports to identify service versions and `-O` attempts OS detection. `-A` turns on version detection, OS detection, default scripts and traceroute together. Several scan types are available, such as TCP connect and SYN scans, and some of them need root privileges.

The Nmap Scripting Engine (NSE) runs Lua scripts against targets for tasks like extra service enumeration and vulnerability checks; `-sC` runs the default set and `--script` selects others. Results can be written as normal text, XML or grepable output with `-oN`, `-oX` and `-oG`, which makes them easy to feed into other tools.

Running `nmap` with no arguments prints a summary of the most common options, and the man page and nmap.org documentation cover the rest. Zenmap is an optional graphical front-end. Only scan networks you own or have permission to test. The license is the Nmap Public Source License, which is free for end users, with a commercial license for redistribution in products.

### Installation

```bash
# via Build from source
./configure
make
make install
```

## Alternatives

- [ttyd](https://www.trmn.sh/tools/ttyd.md): Command-line tool that shares a terminal command over the web, served via libuv and rendered in the browser with WebGL2, with SSL and basic auth. (C, 12.6k stars)
- [weechat](https://www.trmn.sh/tools/weechat.md): Terminal-based chat client with modular plugin architecture and multi-protocol support, primarily for IRC (C, 3.4k stars)
- [irssi](https://www.trmn.sh/tools/irssi.md): Terminal-based IRC client with modular architecture and support for multiple chat protocols (C, 3.2k stars)
- [elinks](https://www.trmn.sh/tools/elinks.md): Text-based web browser with frame/table support, scripting, and extensive customization options (C, 643 stars)
- [wrk](https://www.trmn.sh/tools/wrk.md): HTTP benchmarking tool that generates high load using multithreaded design and event notification systems (C, 40.4k stars)

---

Canonical: https://www.trmn.sh/tools/nmap
