Back to BlogsTools

Nmap Cheat Sheet — Essential Commands for Hackers

Anuj Singh (Admin) 18 March 2026 559 views

Nmap Command Cheat Sheet

Basic Scans

  • nmap target — Scan top 1000 ports
  • nmap -p 1-65535 target — Scan ALL ports
  • nmap -sV target — Version detection
  • nmap -O target — OS detection
  • nmap -A target — Aggressive scan (everything)

Stealth Scans

  • nmap -sS target — SYN scan (half-open)
  • nmap -sN target — NULL scan
  • nmap -f target — Fragment packets

NSE Scripts

  • nmap --script vuln target — Run vulnerability scripts
  • nmap --script http-enum target — Enumerate web directories

Network Scanning

  • nmap 192.168.1.0/24 — Scan entire subnet
  • nmap -sn 192.168.1.0/24 — Ping sweep (host discovery)

Learn Nmap in depth with our ethical hacking course!

Want to Learn This Practically?

Subscribe to ONLY4YOU and get hands-on access to 40+ premium courses — Ethical Hacking, Kali Linux, Metasploit, Network Hacking, Bug Bounty & more!