How to get the MAC address of a Raspberry Pi
Learn two distinct approaches to retrieve the MAC address of your Raspberry Pi 4 in this detailed tutorial.
Method One: HDMI connected
If you do have an HDMI cable, connect it to a screen and boot the Raspberry Pi without an SD card. When it boots up, it will show a screen with different information about the board. At the end of the board
line, you can see the MAC address.
Method Two: No HDMI connected
If for any reason you don’t have the HDMI cable to connect the Raspberry Pi with, you can do it with arp-scan
from your machine.
To install arp-scan
on a Debian based system, run the following:
|
|
To install arp-scan
on an Arch based system, run the following:
|
|
Now that you have it installed, find out the name of the local interface, ethernet or wireless by doing the following:
|
|
This will list the available interfaces, and you should look for the one which says state UP
in the description. If your interface is called eth0
for example, run the following to get the MAC address of the Raspberry Pi:
|
|
This will return a list of devices connected to the local network, and you should look for the one which says something like Raspberry Pi Limited
, Or simply get it in a single command without looking through a list:
|
|
If you find this post helpful, please consider supporting the blog. Your contributions help sustain the development and sharing of great content. Your support is greatly appreciated!
Buy Me a Coffee