Nmap
Network Security 8 commands

Nmap

Network exploration and security auditing tool. Discovers hosts and services on a network by sending packets and analyzing responses.

scanningenumerationnetworkreconnaissance
Official docs

Installation

sudo apt install nmap
# or
brew install nmap
# or download from nmap.org

Commands & usage

8 entries
  • nmap -sS <target>

    SYN scan (stealth scan)

  • nmap -sV <target>

    Service version detection

  • nmap -O <target>

    OS detection

  • nmap -A <target>

    Aggressive scan (OS, version, scripts, traceroute)

  • nmap -p- <target>

    Scan all 65535 ports

  • nmap --script vuln <target>

    Run vulnerability scripts

  • nmap -sU <target>

    UDP scan

  • nmap -sn <network>/24

    Ping sweep (host discovery)

Use cases

Network discoveryPort scanningVulnerability scanningService enumerationFirewall testing