nmap
Network exploration tool and security scanner for discovering hosts and services.
Synopsis
nmap [OPTION]... [TARGET]...
Examples
nmap 192.168.1.1
nmap -sV -p 1-1000 host.example.com
nmap -A 192.168.1.0/24
nmap -sS -Pn -p 22,80,443 host.example.com
Common options
| Flag | Description |
|---|---|
| -sS | TCP SYN scan (stealth) |
| -sV | Detect service versions |
| -O | OS detection |
| -p | Port range |
| -A | Aggressive scan (OS, version, scripts, traceroute) |
| -Pn | Skip host discovery |
About nmap
The `nmap` command network exploration tool and security scanner for discovering hosts and services. Networking commands handle connectivity testing, DNS resolution, data transfer, remote access, firewall rules, and traffic analysis.
Linux is the dominant server operating system, and strong networking skills are essential for web hosting, container orchestration, security auditing, and infrastructure management. The command accepts 6 commonly used flags shown above, though the full set of options is available in the man page (`man nmap`).
The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.
Related commands
More Network Commands
Other commands in the Network category