nmap
Linux · Network · reference only
What it does
Network and port scanner: it discovers live hosts, open ports and the services they offer.
Syntax
nmap [opciones] objetivo
Options and parameters
-p puertosScans only those ports, such as 22,80 or 1-1024.
-sVTries to find out the service and version of each open port.
-sSSYN scan, fast and stealthy (requires root).
-snOnly discovers live hosts, without scanning ports.
-PnDoes not check whether the host is up and scans directly.
-OTries to detect the operating system (requires root).
-T4Aggressive timing template, suitable for local networks.
--openShows only open ports.
Usage examples
nmap localhostScans the most common ports of your own machine.
nmap -p 22,80,443 192.168.1.10Checks only those three ports on a host.
nmap -sV scanme.nmap.orgDetects service versions on the test server that the Nmap project provides for practice.
nmap -sn 192.168.1.0/24Discovers which hosts are up on your local network.
Notes and common mistakes
- Scanning other people's machines without permission may be illegal: use only your own machines or authorized practice environments.
- It is installed with sudo apt install nmap.