Macos – Finding other computers on network over command line

command linemacosnetworking

I've got a handful of Macs on my home network, and shell access to only one of them from the outside. How can I figure out what IP address of the other machines are?

Best Answer

Try arp -a to see your computer's current arp table. It will show only those IP addresses your computer has interacted with. Output like this (obscured a little to hide MAC addresses on my network):

$ arp -a
? ( at xx:xx:9e:82:ab:f6 on en1 ifscope [ethernet]
? ( at xx:xx:29:d3:17:8 on en1 ifscope [ethernet]
? ( at xx:xx:2:4f:76:14 on en1 ifscope [ethernet]
? ( at xx:xx:6b:d0:36:a5 on en1 ifscope [ethernet]
? ( at (incomplete) on en1 ifscope [ethernet]
? ( at xx:xx:65:46:cd:b8 on en1 ifscope [ethernet]
? ( at ff:ff:ff:ff:ff:ff on en1 ifscope [ethernet]
? ( at ff:ff:ff:ff:ff:ff on vmnet8 ifscope [ethernet]
? ( at (incomplete) on vmnet1 ifscope [ethernet]

If you don't have further information on which computer is which, you can gain a little more information by identifying the manufacturers of the network cards through MAC address lookup.