SCAN TYPES
| Flag | Description |
| -sn | Ping scan — host discovery only, no port scan |
| -sS | SYN scan — stealthy, half-open (default with root) |
| -sT | TCP connect scan — full handshake, no root needed |
| -sU | UDP scan — slower, finds UDP services |
| -sA | ACK scan — maps firewall rules |
DETECTION FLAGS
| Flag | Description |
| -sV | Service/version detection |
| -O | OS detection (requires root) |
| -A | Aggressive: OS + version + scripts + traceroute |
| -sC | Default NSE scripts |
PORT SELECTION
| Flag | Description |
| -p 80,443 | Specific ports |
| -p 1-1024 | Port range |
| -p- | All 65535 ports |
| --top-ports 100 | Top 100 most common ports |
TIMING & PERFORMANCE
| Flag | Description |
| -T0 to -T5 | Timing template (0=paranoid, 5=insane) |
| -T4 | Fast scan — good for local networks |
OUTPUT FLAGS
| Flag | Description |
| -oN file.txt | Normal output to file |
| -oX file.xml | XML output |
| -oG file.gnmap | Grepable output |
| -v / -vv | Verbose / very verbose |
COMMON EXAMPLES
Quick host check
nmap -sn 10.10.14.100
Subnet ping sweep (find live hosts)
nmap -sn 10.10.14.0/24
List scan (no packets sent)
nmap -sL 10.10.14.0/24
SYN scan top ports
nmap -sS 10.10.14.100
Version + OS detection
nmap -sV -O 10.10.14.100
Full aggressive scan
nmap -A -T4 10.10.14.100
All ports
nmap -p- -T4 10.10.14.100
Script scan
nmap -sC -sV 10.10.14.100