Ping an entire network / netblock

You can use fping to ping a netblock to see which hosts are alive:

fping -g

You could also put ping into a loop, but the output is less than useful:

for i in {1..254}; do ping -c1 192.168.1.$i; done

nmap is also a handy solution and can provide much more host information if needed:

nmap -sP

nmap and fping should both be available as packages for your distro.

You can leave a response, or trackback from your own site.

Leave a Reply