/ Saiyaj.in

List computers on a LAN

Use nmap with -sA parameters to scan your network, you will get the list of the connected devices in a output like this:

$ sudo nmap -sA 192.168.2.0/24
Password:

Starting Nmap 7.10 ( https://nmap.org ) at 2016-04-05 15:02 EST
Nmap scan report for 192.168.2.1
Host is up (0.018s latency).
All 1000 scanned ports on 192.168.2.1 are unfiltered
MAC Address: 58:6D:8F:AC:B3:28 (Cisco-Linksys)

Nmap scan report for 192.168.2.131
Host is up (0.0079s latency).
All 1000 scanned ports on 192.168.2.131 are unfiltered
MAC Address: B8:27:EB:CB:FE:06 (Raspberry Pi Foundation)

Nmap scan report for 192.168.2.141
Host is up (0.094s latency).
All 1000 scanned ports on 192.168.2.141 are filtered
MAC Address: 84:10:0D:A7:48:8D (Motorola Mobility, a Lenovo Company)

Nmap scan report for 192.168.2.100
Host is up (0.000087s latency).
All 1000 scanned ports on 192.168.2.100 are unfiltered

Nmap done: 256 IP addresses (4 hosts up) scanned in 25.90 seconds