Network

nmap

Network exploration tool and security scanner for discovering hosts and services.

Synopsis

syntax
nmap [OPTION]... [TARGET]...

Examples

Scan common ports on host
nmap 192.168.1.1
Version detect on ports 1-1000
nmap -sV -p 1-1000 host.example.com
Aggressive scan entire subnet
nmap -A 192.168.1.0/24
Stealth scan specific ports
nmap -sS -Pn -p 22,80,443 host.example.com

Common options

FlagDescription
-sSTCP SYN scan (stealth)
-sVDetect service versions
-OOS detection
-pPort range
-AAggressive scan (OS, version, scripts, traceroute)
-PnSkip host discovery

About nmap

The `nmap` command network exploration tool and security scanner for discovering hosts and services. Networking commands handle connectivity testing, DNS resolution, data transfer, remote access, firewall rules, and traffic analysis.

Linux is the dominant server operating system, and strong networking skills are essential for web hosting, container orchestration, security auditing, and infrastructure management. The command accepts 6 commonly used flags shown above, though the full set of options is available in the man page (`man nmap`).

The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More Network Commands

Other commands in the Network category

Related tools