Wondering about the devices connected to your Wi-Fi router? Try using the powerful Nmap network scanner and you can find out with just one command.
Get Your Wi-Fi IP Address
The first thing you need to know is the internal IP address of your Wi-Fi router. Most Wi-Fi routers will use a private IP address for the network with Network Address Translation to transfer packets to and from the internet. Three IPv4 address ranges aredesignated for private networks: 10.0.0.0, 172.16.0.0, and 192.168.0.0.
If you don’t know your router’s IP address, use theip routecommand. Look for the line that says “default.” Assuming you’re on a simple single-homed network with only one internet connection, the address on that line will be your gateway.

Check Your Subnet Mask
IPv4 addressesalso use a subnet maskto differentiate which part of the address belongs to the network and which part identifies the host. The 192.168.0.0 has a 255.255.255.0 subnet mask. You might see something similar when you log into the web-based router configuration tool. This means that the first three parts of the dotted decimal address, the 192.168.0 part, belong to the network.
With this subnet mask, 256 addresses are available. That is usually more than enough for most small office and residential networks.

The Linux ip utility and Nmap use CIDR (Classless Inter-Domain Routing) notation to represent subnet masks. This format follows the IP address with a/(slash) character and the number of bits in the mask. A 255.255.555 subnet mask is 24 bits long, so our router IP address and subnet mask combination is 192.168.0.1/24 under CIDR.
You should only use this on your own Wi-Fi network or one you have permission to scan.
With this information, you can useNmapto list the clients on your Wi-Fi network. If you don’t have it installed, you can do so on Ubuntu and Debian with this command:
And on Arch:
And on Red Hat family distros:
To list clients, use the -sn option followed by the router IP address with the CIDR subnet mask. This will list the IP addresses of any clients on the network that respond but will stop short of actually scanning them. For example:
Now You Can See Who’s on Your Network
Nmap is a powerful network scanner for Linux. You can use it to find out the devices that are connected to your Wi-Fi network from the command line.