nmap
15 commands
15 shown
Scan single host
Basic port scan of a single host
nmap 192.168.1.1
Scan TCP SYN (stealth)
Stealth SYN scan (requires root)
nmap -sS 192.168.1.1
Scan all ports
Scan all 65535 ports
nmap -p- 192.168.1.1
Service version detection
Probe open ports to determine service/version info
nmap -sV 192.168.1.1
OS detection
Enable OS detection (requires root)
nmap -O 192.168.1.1
Aggressive scan
Enables OS detection, version detection, script scanning, and traceroute
nmap -A 192.168.1.1
Scan a subnet
Scan all hosts in a /24 subnet
nmap 192.168.1.0/24
Ping scan (host discovery)
Discover live hosts without port scan
nmap -sn 192.168.1.0/24
Scan specific ports
Scan only specified ports
nmap -p 22,80,443,8080 192.168.1.1
Scan port range
Scan ports in a given range
nmap -p 1-1024 192.168.1.1
UDP scan
Scan UDP ports (slower, requires root)
nmap -sU 192.168.1.1
Run default scripts
Run default NSE scripts against target
nmap -sC 192.168.1.1
Run specific NSE script
Run a named Nmap scripting engine script
nmap --script http-title 192.168.1.1
Output to XML
Save scan results in XML format
nmap -oX scan.xml 192.168.1.1
Fast scan (top 100 ports)
Scan only the 100 most common ports
nmap -F 192.168.1.1
no commands match