nmap commands

15 commands, each with a one-line explanation. Click a command to copy it, or its title for details.

Commands 15 shown

  • nmap 192.168.1.1

    Basic port scan of a single host

    network · scan

  • nmap -sS 192.168.1.1

    Stealth SYN scan (requires root)

    network · syn

  • nmap -p- 192.168.1.1

    Scan all 65535 ports

    network · ports

  • nmap -sV 192.168.1.1

    Probe open ports to determine service/version info

    network · version

  • nmap -O 192.168.1.1

    Enable OS detection (requires root)

    network · os

  • nmap -A 192.168.1.1

    Enables OS detection, version detection, script scanning, and traceroute

    network · aggressive

  • nmap 192.168.1.0/24

    Scan all hosts in a /24 subnet

    network · subnet

  • nmap -sn 192.168.1.0/24

    Discover live hosts without port scan

    network · ping

  • nmap -p 22,80,443,8080 192.168.1.1

    Scan only specified ports

    network · ports

  • nmap -p 1-1024 192.168.1.1

    Scan ports in a given range

    network · ports

  • nmap -sU 192.168.1.1

    Scan UDP ports (slower, requires root)

    network · udp

  • nmap -sC 192.168.1.1

    Run default NSE scripts against target

    network · scripts · nse

  • nmap --script http-title 192.168.1.1

    Run a named Nmap scripting engine script

    network · scripts · nse

  • nmap -oX scan.xml 192.168.1.1

    Save scan results in XML format

    network · output

  • nmap -F 192.168.1.1

    Scan only the 100 most common ports

    network · fast