I have a number of Raspberry Pi 2 and need to know the MAC addresses of these before installation. Is there a way to get or deduce the MAC address given access to the physical Pi but without having to boot it up and connect to a display?

  • 2
    You don't have to connect it to a display, just put a card with an OS on in, attach it to ethernet, plug it in, wait a minute, get the MAC address from the network, unplug it. Pretty much all distros should get online without any configuration via cable.
    – goldilocks
    Commented Jun 22, 2015 at 13:37

3 Answers 3


There's no way to achieve what you need without booting up. Even though there might be a register at Raspberry HQ connecting the sticker and MAC address, it's not available for the public.

To identify, deploy and maintain an array of Pi's I have a seperate SD card which I insert to every new Pi and boot once. MAC and Serial is then send to a php script on an external server.


wget http://example.org/pidentify.php?serial=`grep -Po '^Serial\s*:\s*\K[[:xdigit:]]{16}' /proc/cpuinfo`&mac=`ip link show eth0 | awk '/ether/ {print $2}`


<? file_put_contents('register/'.date('Y-m-d_H:i:s_').uniqid().'.txt', serialize($_REQUEST)); ?>

*** The matrix sticker might be connected to the serial number (read: the processor's serial number). Even if it does, I personally find my workflow easier.

  • Update: Today I've been playing with the sticker contents but couldn;t find any connection. I did find out that the MAC address is build as AA:AA:AA:BB:BB:BB where A is always B8:27:EB (Reserved MAC range for Raspberry Pi Foundation), and B is the ARM serial number.
    – EDP
    Commented Jul 13, 2015 at 20:07
  • does your workflow require removing /etc/udev/rules.d/70-persistent-net.rules every time? I am just wondering if I am missing something?
    – Daniel C
    Commented Sep 1, 2015 at 16:16
  • I don't understand your question. Nothing to remove. pidentify.sh should run on the pi, pidentify.php should run on a remote webserver of course.
    – EDP
    Commented Sep 1, 2015 at 16:20
  • Whenever I use a previously used SD card on a PI, I have to clear that file or I find that the eth0 interface doesn't seem to come up. Perhaps the problem is not universal: raspberrypi.stackexchange.com/questions/26155/…
    – Daniel C
    Commented Sep 1, 2015 at 16:40
  • I always put an original non-modified raspberry image on my disks and do the updates and filesystem expansion manually (but via a script of course). Therefore I never had that mac-eth0-binding issue. I suggest you do the same. At first hand it looks like going manually would eat up precious time compared to flashing with a up to date image, but it's just the opposite.
    – EDP
    Commented Sep 2, 2015 at 9:11

I don't think there's a way. No.

However, it is possible to get it without connecting display by connecting it via SSH. But clearly, you don't want to boot it up so it is out of question. Hope it helps.


By MAC address I guess you mean the MAC address of the on-board Ethernet controller.

The answer is no, the MAC is not printed on the Pi2. I suppose you could ask the manufacturers to start printing the information on the Pi or the delivery package.

I believe the address is held within OTP memory on the PI2. The device needs to be booted for you to get the MAC.

  • There is some sort of unique number printed as a data matrix next to the SD card holder. By comparing two of those number with their respective MAC addresses I couldn't find any obvious connection though.
    – moonhouse
    Commented Jun 22, 2015 at 14:53
  • @moonhouse Can you read the code? Mine includes a printed 24/01 but I have no ability to read the code itself.
    – joan
    Commented Jun 22, 2015 at 15:27
  • @moonhouse any reference to what you're claiming ? Commented Jun 22, 2015 at 18:06
  • @joan I used boy.co.ua/decode.php to decode the data matrix.
    – moonhouse
    Commented Jun 23, 2015 at 15:02
  • @dastaan If I can reference my claim that the number in the data matrix is unique? No, I can only conclude that the data matrices of three Raspberry Pi 2 are different from each other. It's a 16 digit code, all three starting with 000001100216 and then different in the last four digits.
    – moonhouse
    Commented Jun 23, 2015 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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