Skip to content

Instantly share code, notes, and snippets.

@dadatuputi
Last active October 4, 2021 12:44
Show Gist options
  • Save dadatuputi/8ed9f09db04795c9da2f05aca102c97a to your computer and use it in GitHub Desktop.
Save dadatuputi/8ed9f09db04795c9da2f05aca102c97a to your computer and use it in GitHub Desktop.
BASH script to find Raspberry Pis on a local network
#!/bin/bash
# findPi:
# Find all Pi's on the LAN
# Replace '10.1.0.0/21' below with your subnet and subnet mask
#
# Should have `net-tools` installed in Debian (apt install net-tools)
fping -a -r1 -g 192.168.1.1/24 &> /dev/null
arp -n | grep -i "B8-27-EB\|DC:A6:32"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment