Cybersecurity-Mastery

Home › Cheatsheets › Nmap Cheatsheet

Nmap Cheatsheet

Scan types, timing, NSE and output options at a glance. Printable: use your browser's Print → Save as PDF.

Domain: Networking · Last updated 2026-08-12

Quick reference

This cheatsheet is a fast recall aid, not a tutorial — learn the concepts in the Manual, then keep this beside you while you work.

Host discovery

CommandPurpose
nmap -sn 10.0.0.0/24Ping sweep (no port scan)
nmap -Pn hostSkip discovery, treat as up
nmap -PS22,80,443 hostTCP SYN discovery on ports

Port scanning

CommandPurpose
nmap -sS hostSYN (half-open) scan — default as root
nmap -sT hostTCP connect (no root)
nmap -sU hostUDP scan (slow)
nmap -p-All 65535 TCP ports
nmap -p 80,443,8080Specific ports
nmap -FFast (top 100)
nmap --top-ports 1000Top N ports

Service, OS, scripts

CommandPurpose
nmap -sV hostVersion detection
nmap -O hostOS detection
nmap -A hostAggressive: -sV -O -sC --traceroute
nmap -sC hostDefault safe NSE scripts
nmap --script vuln hostVuln category scripts
nmap --script "http-*" hostCategory glob

Timing & output

FlagPurpose
-T0..-T5paranoid → insane (stealth ↔ speed)
--min-rate/--max-ratePackets per second control
-oA baseSave normal + XML + grepable
-v / -dVerbose / debug
--reasonWhy a port is in its state
Scan only hosts you own or are authorised to test. A -T4 -p- full scan is loud; an IDS sees the SYN sweep.
Cybersecurity-Mastery — interactive security learning · runs locally