LinuxCommandLibrary

nmap

TLDR

Scan single host

$ nmap [192.168.1.1]
copy
Scan network range
$ nmap [192.168.1.0/24]
copy
Scan specific ports
$ nmap -p [22,80,443] [host]
copy
Service/version detection
$ nmap -sV [host]
copy
OS detection
$ nmap -O [host]
copy
Aggressive scan
$ nmap -A [host]
copy
Stealth SYN scan
$ nmap -sS [host]
copy
UDP scan
$ nmap -sU [host]
copy
Save output
$ nmap -oN [output.txt] [host]
copy

SYNOPSIS

nmap [options] targets

DESCRIPTION

nmap is the Network Mapper. It discovers hosts and services on networks.
The tool performs port scanning. Essential for network security assessment.
nmap is network scanner.

PARAMETERS

TARGETS

Hosts/networks to scan.
-p PORTS
Ports to scan.
-sV
Service version detection.
-O
OS detection.
-A
Aggressive scan.
-sS
TCP SYN scan.
-sU
UDP scan.
-oN FILE
Normal output file.
--help
Display help information.

CAVEATS

Authorized use only. Some scans need root. May trigger IDS alerts.

HISTORY

Nmap was created by Gordon Lyon (Fyodor) in 1997 and is the premier network scanning tool.

SEE ALSO

masscan(1), netcat(1), zenmap(1)

Copied to clipboard