Nmap needs a target: one IP, a list, or a whole range. Ranges are written in CIDR notation, like 192.168.1.0/24.
What /24 means
An IPv4 address has 32 bits. The number after the slash says how many bits are fixed (the network part). The rest can change (the hosts).
| CIDR | Addresses | Example range |
|---|---|---|
| /32 | 1 | just 192.168.1.10 |
| /30 | 4 | 192.168.1.8 – .11 |
| /24 | 256 | 192.168.1.0 – .255 |
| /16 | 65,536 | 192.168.0.0 – 192.168.255.255 |
So /24 = 256 addresses. Type /16 by mistake and you scan 256 times more machines than you meant to.
Find your own lab subnet
ip a
Look for something like inet 10.0.2.15/24. In your lab, that's the range you scan:
nmap -sn 10.0.2.0/24
-sn only checks which hosts are up, without scanning ports.
Want more detail? IP addresses and subnets in the Networking path.