For a more compact list of connected devices:
nmap -sL 192.168.0.* | grep \(1
Explanation.
nmap -sL 192.168.0.*
will list all IPs in subnetwork and mark those, that have name:
Nmap scan report for 192.168.0.0
Nmap scan report for Dlink-Router.Dlink (192.168.0.1)
Nmap scan report for 192.168.0.2
...
Nmap scan report for android-473e80f183648322.Dlink (192.168.0.53)
...
Nmap scan report for 192.168.0.255
As all interesting records start with parenthesis (
and digit 1
, we filter for that with | grep \(1
(backslash is needed to escape parenthesis)
Quirk
Beware that if two devices have the same name, nmap
will show only the one, that was connected to router last
1http://askubuntu.com/questions/82480/how-to-see-all-computers-connected-to-a-network || http://serverfault.com/questions/72380/is-it-possible-to-find-a-list-of-machines-and-or-ip-addresses-connected-to-the-l – Ciro Santilli 新疆改造中心法轮功六四事件 – 2015-11-30T11:30:55.093
1
More duplicates: 1. Getting all IPs of devices connected to the same router. 2. Display list of computers on a LAN in Linux
– Alexander Malakhov – 2016-10-22T09:08:19.3203. Best method and tools for local IP scanning – Alexander Malakhov – 2016-10-22T09:21:32.270