is it possible to get the MAC address for machine using nmap

Jury A picture Jury A · Nov 3, 2012 · Viewed 164.7k times · Source

I have a list of remote machines in a text files. Can I know their MAC addresses using nmap ?

Answer

Karimi picture Karimi · Jan 4, 2013

If you're using nmap, MAC addresses are only available if you're on the same network segment as the target. Newer versions of nmap will only show the MAC address to you if you're running as root.

i.e.:

sudo nmap -sP -n 192.168.0.0/24