Low Orbit Flux Logo 2 F

How To Find MAC Address of Raspberry Pi

It is pretty easy to find the MAC address of a Raspberry Pi. Either of these two commands should show you the MAC address for every interface on your system ( ethernet, wifi, etc. ) assuming you’re running Linux.


ifconfig -a    # older command
ip a              # newer command

Before getting started you should know what you are looking for. Which interface do you want to find the MAC address for? The ethernet interface or the wifi interface? What version of Linux are you running? Are you running Linux? We’re assuming you’re running Rasbian Linux on your Raspberry Pi.

Do you want to find the MAC address:

Are you looking for the MAC address for:

From your Raspberry Pi

As mentioned above, you really just need either of these two commands to find your MAC address for any interface on your system. Depending on which distro and which version you are running either or both of these commands may be installed on your system. They will both give you what you are looking for.


ifconfig -a    # older command
ip a              # newer command

Another interesting way to lookup your MAC address would be to check this file. This will tell you eth0. Swap the interface name if needed.


cat /sys/class/net/eth0/address

You could also use the ethtool command. If you really want to.


ethtool -P eth0

Find Raspberry Pi MAC Address Over The Network

If you are trying to find a MAC address over the network you will need to be on the same local network. this means that you can’t be traversing a router to reach your Raspberry Pi.

Use ARP. This will work if you are on the same subnet ( don’t connect through a router ). The arp command will list out all addresses in the ARP cache. One of those will probably be your Raspberry Pi if it is on the same local network.


arp 

Use a network scanner. You will generally need to run these from the same local network for these to be able to show the MAC address. A few options:

References