How to find all LAN devices in Ubuntu



One of the most easy ways to see all the LAN devices is using the packet nmap

To install the nmap packet on Ubuntu we just need to execute the next command on a terminal:

sudo apt-get install nmap

Once the tool is installed, to check all the LAN devices we execute in a terminal:

# We should change $ROUTER_IP for the IP of our router 
nmap -sP $ROUTER_IP/24
 
# The Output of the command shall be something like:
Starting Nmap 6.40 ( http://nmap.org ) at 2015-06-20 19:07 CEST
Nmap scan report for 192.168.0.1
Host is up (0.054s latency).
Nmap scan report for 192.168.0.14
Host is up (0.0053s latency).
Nmap scan report for 192.168.0.16
Host is up (0.10s latency).
Nmap scan report for 192.168.0.17
Host is up (0.00020s latency).
Nmap scan report for 192.168.0.21
Host is up (0.087s latency).
Nmap scan report for 192.168.0.23
Host is up (0.012s latency).
Nmap scan report for 192.168.0.28
Host is up (0.013s latency).
Nmap done: 256 IP addresses (7 hosts up) scanned in 4.34 seconds

Nmap is a very powerful tool and can be used to obtain a lot of information of any device connected to the same net as you are, or even WAN devices.

 

If you have any doubt, don't hesitate commenting !

Leave a comment

You have to wait to comment again. Wait Time: