Note: I assume the addressing space of the local network is 192.168.1.1/255.255.255.0.
for ip in $(seq 1 254); do ping -c 1 192.168.1.$ip>/dev/null; [ $? -eq 0 ] && echo "192.168.1.$ip UP" || : ; doneInstall arp-scan. On Mac with homebrew:
brew install arp-scanon Ubuntu/Debian with apt-get:
sudo apt-get install arp-scanScan local network:
sudo arp-scan -lScan local network specifying network interface (it might be required if arp-scan is not able to decide which one to use):
sudo arp-scan --interface eth0 -lSpecify a range:
sudo arp-scan 192.168.1.1-192.168.1.50
``