Using shell script to ping all IPs

$ i=1
$ while [ $i -lt 256 ]; do i=$(($i+1)) ; ping -c 3 192.168.0.$i; done

But if you have nmap installed:

$ nmap -sP 192.168.0.*
or
$ nmap -sn 192.168.0.0/24

Source: https://stackoverflow.com/questions/13669585/how-to-get-a-list-of-all-valid-ip-addresses-in-a-local-network

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s