You could use fping sudo apt-get install fping
(in debian-like OSs).
fping is similar to ping, but much better performing when pinging multiple hosts. The -r 1 flag tells fping to perform only one round. The 2>1 part allows grep to filter the output.
$ fping -g -r 1 192.168.1.0/24 2>1 | grep "alive"
Would display something like:
192.168.1.1 is alive
192.168.1.10 is alive
192.168.1.15 is alive
192.168.1.27 is alive
There is also an interesting flag for nmap that would let you see the MAC vendor - if known. Use with sudo in order to see the MAC addresses.
$ sudo nmap -sP 192.168.1.0/24
You would get for instance:
Starting Nmap 7.40 ( https://nmap.org ) at 2019-05-23 18:49 CEST
Nmap scan report for 192.168.1.14
Host is up (-0.036s latency).
MAC Address: 20:F4:1B:E5:8F:7B (Shenzhen Bilian electronic)
Nmap scan report for 192.168.1.15
Host is up (-0.084s latency).
MAC Address: A4:31:35:E8:58:9E (Apple)
Nmap scan report for 192.168.1.27
Host is up (-0.15s latency).
MAC Address: 34:8A:7B:38:E3:14 (Samsung Electronics)
Nmap scan report for 192.168.1.29
Host is up (0.010s latency).
MAC Address: 80:2B:F9:75:F8:FF (Unknown)
Nmap scan report for 192.168.1.10
Host is up.
Nmap done: 256 IP addresses (5 hosts up) scanned in 25.52 seconds
2
possible duplicate of How can I list all IPs in the connected network, through Terminal preferably?
– Ciro Santilli 新疆改造中心法轮功六四事件 – 2015-09-10T08:29:40.923