Every time I restart my raspberry pi the MAC address changes. Due to this, while connecting remotely I have to hunt for its new IP.

  • 6
    I don't believe the MAC address changes as it is "hard coded" in the Raspberry Pi hardware (as all MAC addresses are). Something else is likely going on... could you edit your question, and let us knw what you're seeing exactly?
    – Seamus
    Apr 10, 2019 at 23:14
  • 5
    @Seamus AFAIK it is NOT "hard coded", but is generated from the SerialNo (which is "hard coded")
    – Milliways
    Apr 10, 2019 at 23:52
  • 2
  • 1
    I can't argue the point effectively because I have not read every standard and specification that's been published. And even if I had, that doesn't mean that the "Pi makers" couldn't violate the standards and specs. I can only say that it's always been my understanding that a MAC address must be unique. I think that's what all of this says. Am I wrong?
    – Seamus
    Apr 11, 2019 at 0:40
  • can you show two or three MAC addresses you've had Apr 11, 2019 at 4:58

4 Answers 4


If you decide you want to keep NetworkManager, it looks like this solution might work:

Found a post on the rpi forums. Apparently NetworkManager can randomize your mac to make it harder to people to snoop on traffic.

Here is a blog post on how to turn it off. https://blog.muench-johannes.de/networkmanager-disable-mac-randomization-314 in case it goes down:

To disable the MAC address randomization create the file


with the content:



Alternatively, see this other question.

  • This worked for me. I was struggling for hours but you save me.
    – Jawad Adil
    Jan 7, 2022 at 2:06

While I agree that the MAC SHOULD not change (except during search, where most manufacturers use a random MAC) you really don't need to know the IP address. (I don't know the IP addresses of my 7 Pi or dozen or so computers on my local network.)

It is simple to connect without knowing IP and also to find the IP address. See https://raspberrypi.stackexchange.com/a/96215/8697

  • 1
    This is a rather simplistic view. Imagine using DHCP reservations (based on MAC) or connecting through firewalls/routers where this simplistic scenario is simply not possible. May 13, 2021 at 1:32

I had the same issue. I found (I don't know how) Network Manger had been installed. Removed it. All now ok.


I had the same issue and realised it is because you have two different MAC addresses

  • one for the wifi
  • one for the ethernet

You can check your MAC address with


in the console. look for the info ether for wlan0 and eth0

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