Complete Nmap Commands Cheat Sheet 2026 | Ultimate Ethical Hacking & Cybersecurity Guide

TEAM
Professional Cybersecurity & Ethical Hacking Tool

Illustration of the Nmap network scanning tool interface displaying active hosts, open ports, and service detection results during a security network scan.

What Is Nmap?

Nmap (Network Mapper) is one of the most powerful and widely used network scanning and cybersecurity auditing tools used by ethical hackers, penetration testers, cybersecurity professionals, and system administrators worldwide.

Nmap helps security professionals discover live hosts, detect open ports, identify running services, analyze firewalls, fingerprint operating systems, and perform professional network security assessments.

The tool is considered essential in ethical hacking, penetration testing, red team operations, bug bounty hunting, and defensive cybersecurity analysis because it provides deep visibility into network infrastructure and exposed services.

Legal & Ethical Warning

Nmap must only be used on systems and networks you own or have explicit authorization to test. Unauthorized network scanning may violate cybersecurity laws, company policies, and digital privacy regulations.

Always perform testing inside authorized lab environments, cybersecurity training platforms, or legal penetration testing engagements.

Why Cybersecurity Professionals Use Nmap

  • Host Discovery: Detect active devices connected to networks.
  • Port Scanning: Identify open TCP and UDP ports.
  • Service Detection: Discover running applications and versions.
  • OS Fingerprinting: Detect target operating systems.
  • Firewall Analysis: Analyze packet filtering behavior.
  • Vulnerability Assessment: Identify weak services and insecure configurations.
  • Cybersecurity Auditing: Perform professional penetration testing.
  • Network Monitoring: Improve infrastructure visibility.

Complete Nmap Commands Cheat Sheet

Nmap Command Description
nmap target.com Basic scan that checks common open ports.
nmap -sn target.com Ping scan used to discover live hosts.
nmap -Pn target.com Skip host discovery and assume target is online.
nmap -sS target.com TCP SYN stealth scan commonly used in ethical hacking.
nmap -sT target.com TCP Connect scan that completes TCP connections.
nmap -sU target.com UDP scan for DNS, SNMP, and UDP services.
nmap -sA target.com ACK scan used for firewall analysis.
nmap -sW target.com TCP Window scan for advanced firewall analysis.
nmap -sM target.com Maimon scan used on BSD systems.
nmap -sN target.com Null scan using packets without flags.
nmap -sF target.com FIN stealth scan.
nmap -sX target.com XMAS scan using FIN, PSH, and URG flags.
nmap -sV target.com Detect running service versions.
nmap -O target.com Operating system detection.
nmap -A target.com Aggressive scan with scripts, OS detection, and traceroute.
nmap -T0 target.com Paranoid slow stealth scan.
nmap -T1 target.com Sneaky scan for IDS evasion.
nmap -T2 target.com Polite scan with reduced network impact.
nmap -T3 target.com Normal default timing template.
nmap -T4 target.com Fast scan commonly used in penetration testing.
nmap -T5 target.com Very aggressive high-speed scan.
nmap -p 80 target.com Scan a specific port.
nmap -p 21,22,80,443 target.com Scan multiple selected ports.
nmap -p- target.com Scan all 65535 ports.
nmap --top-ports 100 target.com Scan top common ports.
nmap -F target.com Fast scan mode.
nmap --open target.com Display only open ports.
nmap -v target.com Verbose output.
nmap -vv target.com Extra verbose output.
nmap -d target.com Enable debugging mode.
nmap --reason target.com Show reasons behind scan results.
nmap --packet-trace target.com Display sent and received packets.
nmap --traceroute target.com Perform traceroute.
nmap -6 target.com Enable IPv6 scanning.
nmap -iL targets.txt Load targets from file.
nmap -oN results.txt target.com Save results in text format.
nmap -oX results.xml target.com Save results as XML.
nmap -oG results.gnmap target.com Save grepable results.
nmap -oA scan target.com Save output in all formats.
nmap --script vuln target.com Run vulnerability detection scripts.
nmap --script default target.com Run default NSE scripts.
nmap --script safe target.com Run safe NSE scripts.
nmap --script discovery target.com Run discovery NSE scripts.
nmap --script auth target.com Run authentication-related scripts.
nmap --script broadcast target.com Run broadcast discovery scripts.
nmap --script http-enum target.com Enumerate web applications and directories.
nmap --script smb-os-discovery target.com Discover SMB operating system information.
nmap --script ftp-anon target.com Check anonymous FTP access.
nmap --script ssl-heartbleed target.com Detect Heartbleed vulnerability.
nmap -f target.com Fragment packets for firewall evasion testing.
nmap -D RND:10 target.com Use random decoy IP addresses.
nmap --spoof-mac Cisco target.com Spoof MAC address vendor.
nmap --source-port 53 target.com Use custom source port.
nmap --randomize-hosts target.com Randomize host scanning order.
nmap --data-length 50 target.com Add random data to packets.
nmap --mtu 24 target.com Specify custom MTU size.
best Nmap commands 2026, complete Nmap cheat sheet, ethical hacking with Nmap, Nmap penetration testing guide, cybersecurity auditing tools, Kali Linux Nmap tutorial, advanced Nmap commands, network scanning techniques, Nmap NSE scripts, professional ethical hacking guide, best cybersecurity tools, Linux penetration testing, Nmap firewall analysis, Nmap vulnerability detection, port scanning tutorial, network security auditing, ethical hacking tutorial, Nmap service detection, Nmap operating system detection, cybersecurity learning guide

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Check Now
Ok, Go it!