How to find devices / machines on your network using nmap and a ping scan.
Make sure you have nmap software installed first: https://nmap.org/download.html
If you are running nmap on Linux then run it as root.
1. Open the terminal / command prompt.
nmap -sP 192.168.2.0/24 | grep 192
With 192.168.2.0/24 being your local network range.
An example result is:
Host wl.Belkin (192.168.2.1) is up (0.00040s latency). (My Router)
Host 192.168.2.2 is up. (Me)
Host 192.168.2.4 is up (0.0028s latency). (Laptop)
nmap: The program we’re using
-sP: Ping Scan – go no further than determining if host is online
192.168.2.1: Your routers IP address
/24: A Class C network = 255.255.255.0 = 256 IP addresses
grep: Another program built in to Linux, it means i only want “192” to be taken from the information we receive.
192: The information we want, in this case the IP addresses.