Skip to content

Finding All Hosts On the LAN From Linux / Windows Workstation

  1. #Linux
  2. 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
  3. #Windows:
  4. for /L %I in (1,1,254) DO pingw 30 -n 1 192.168.1.%I | find “Reply”