Skip to content

Instantly share code, notes, and snippets.

@bhargavpanth
Last active January 10, 2017 19:47
Show Gist options
  • Save bhargavpanth/e2895be075f20f32d89a5fb5f1490509 to your computer and use it in GitHub Desktop.
Save bhargavpanth/e2895be075f20f32d89a5fb5f1490509 to your computer and use it in GitHub Desktop.
Find all hosts on local network
Find all devices
----------------
for ip in $(seq 1 254); do ping -c 1 192.168.1.$ip>/dev/null;
[ $? -eq 0 ] && echo "192.168.1.$ip UP" || : ;
done
Using nmap
----------
sudo nmap -sP 192.168.x.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment