So I'm trying to find the MAC and IP addresses of all devices connected to LAN on my RaspberryPi running Raspbian. So far I've tried to get the list with:

$ arp
$ sudo arp-scan -l
$ sudo nmap -sn

...but they're not really reliable. If for e.g. my phone connects to the network sometimes it'll be found immediately and sometimes not. I would like to find a way to discover all newly connected devices quickly.


Arp will list your arp-cache. This is the list of devices that your system has had contact with.

The nmap scan will contact all the devices, so after the nmap scan, arp will list all the devices. So, if you do it in the sequence

$ nmap > /dev/null
$ arp

you should get the complete list.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.