This command-line cheat sheet is designed to briefly reference a number of the mostly used NMAP instructions, together with a short description and sensible examples as an instance their use. Whether or not you’re a seasoned skilled trying to brush up in your command-line abilities or a newcomer wanting to discover the chances of networking by means of NMAP, you’ll discover worthwhile insights and shortcuts right here.
Set up
Distribution
Command
Debian/Ubuntu
sudo apt-get set up nmap
CentOS/Fedora/Purple Hat
sudo yum set up nmap or sudo dnf set up nmap
NixOS
nix-env -iA nixos.nmap
Utilization
Fundamental Scans
Process
Command
Scan a single IP
nmap 192.168.1.1
Scan a variety of IPs
nmap 192.168.1.1-20
Scan all ports
nmap -p "-" 192.168.1.1
Keep away from DNS decision
nmap -n 192.168.1.1
Port Specification and Scans
Change
Instance
Description
-p
nmap 192.168.1.1 -p 21
Port scan for port x
-p
nmap 192.168.1.1 -p 21-100
Port vary
-p
nmap 192.168.1.1 -p U:53,T:21-25,80
Port scan a number of TCP and UDP ports
-p
nmap 192.168.1.1 -p-
Port scan all ports
-p
nmap 192.168.1.1 -p http,https
Port scan from service identify
-F
nmap 192.168.1.1 -F
Quick port scan (100 ports)
--top-ports
nmap 192.168.1.1 --top-ports 2000
Port scan the highest x ports
-p
nmap -p T:80,T:8080,U:80,U:8080 192.168.1.1
Scan particular TCP and UDP ports
Superior Scans
Process
Command
OS detection
nmap -O 192.168.1.1
Service model detection
nmap -sV 192.168.1.1
Aggressive scan
nmap -A 192.168.1.1
Service and Model Detection
Change
Instance
Description
-sV
nmap 192.168.1.1 -sV
Allow depth stage 9. There’s a greater chance of correctness. Slower
-sV -version-intensity
nmap 192.168.1.1 -sV -version-intensity 8
Depth stage 0 to 9. A better quantity will increase the potential of correctness
-sV -version-light
nmap 192.168.1.1 -sV -version-light
Allow mild mode. Decrease chance of correctness. Quicker
-sV -version-all
nmap 192.168.1.1 -sV -version-all
Allow depth stage 9. Increased chance of correctness. Slower
OS Detection
Change
Instance
Description
-O
nmap 192.168.1.1 -O
Distant OS detection utilizing TCP/IP stack fingerprinting
-O -osscan-limit
nmap 192.168.1.1 -O -osscan-limit
Limits OS detection to hosts with at the very least one open and one closed port
-O -osscan-guess
nmap 192.168.1.1 -O -osscan-guess
Makes Nmap guess extra aggressively about OS
-O -max-os-tries
nmap 192.168.1.1 -O -max-os-tries 1
Set the utmost variety of OS detection tries towards a goal
Timing and Efficiency
Change
Instance
Description
-T0 to -T5
nmap 192.168.1.1 -T0 … nmap 192.168.1.1 -T5
Varies from paranoid (IDS evasion) to insane speeds
This NMAP Command-Line Cheat Sheet concisely references probably the most generally used instructions within the highly effective NMAP suite. Designed for learners and skilled community directors, it consists of important instructions for numerous duties—from easy IP scans to detailed service detection and safety auditing.
You Could Additionally Be In
References
Nmap Documentation: The official Nmap documentation is effective for in-depth data on instructions and functionalities. (https://nmap.org/docs.html)