Skip to main content

Send us a Topic or Tip

Have a suggestion for the blog? Perhaps a topic you'd like us to write about? If so, we'd love to hear from you! Fancy yourself a writer and have a tech tip, handy computer trick, or "how to" to share? Let us know what you'd like to contribute!

Thanks for reaching out!

Tech Tip: Finding and Changing Your MAC Address in OS X

Every network card in your Mac, whether it’s for Ethernet, Wi-Fi, or even Thunderbolt, has been assigned a unique identifier called a Media Access Control or MAC address. This address can be used to identify a specific computer when it’s on the Internet, so those individuals who are very concerned about privacy sometimes use what’s called “MAC address spoofing” to temporarily mask the MAC address of the computer they’re using. It’s rare, but it’s one of those things you might need to know someday.

Find the MAC address
First, let’s find the existing MAC address for the connection you’re most likely using — a Wi-Fi connection. This is quite simple; just hold down the Option key on your keyboard, then click on the Wi-Fi icon in the Mac menubar:

Using the option key and Wi-Fi icon to find the interface name and MAC address for Wi-Fi
Using the option key and Wi-Fi icon to find the interface name and MAC address for Wi-Fi

This tells us a few things about the Mac we’re on. First, it’s using an interface with the name of en1 to connect to Wi-Fi. The MAC address is right below that interface name — in this case, it begins with the hexadecimal address 28:f0:76...and I’m going to stop right there because I don’t want to encourage hackers to break into my machine!

If you need to check the MAC address for other network devices, the System Information utility is very helpful. Launch it from Applications > Utilities > System Information, or from the Apple Menu > About This Mac > System Report. In either case, click on Network, then the specific network hardware you wish to find. On my iMac (see image below), the Ethernet card is listed as en0 with a MAC address beginning with 38:c9:86...

Use the System Information Utility to find other MAC addresses
Use the System Information Utility to find other MAC addresses

You can also use the Terminal to find the current MAC address of an interface. Launch Terminal from the Applications > Utilities folder, then type in the command highlighted in yellow below, substituting the correct BSD Device Name (in this case, en1):

Using Terminal to determine the MAC address of a network interface
Using Terminal to determine the MAC address of a network interface

Changing the MAC address
Here comes the fun part. Remember, there’s usually no reason for you to change the MAC address unless you have a specific reason to do so. Both of the methods I’m demonstrating here require the use of Terminal. If you’re not comfortable with the OS X command line, perhaps it’s not a good idea to play with MAC addresses…

First, let’s change the MAC address to a specific address. It needs to be twelve hexadecimal numbers in groups of two, separated by colons. For example, something like 14:d2:71:11:57:a6 would work.

Now at the Terminal prompt, (without the quotes) type in “sudo ifconfig en1 ether 14:d2:71:11:57:a6" and press the return key. In this case, Terminal sets the MAC address of en1 (which is the Wi-Fi adapter in my iMac) to the address we selected.

The next method changed the MAC address to a randomly chosen address, which is probably the absolute best way to ensure your privacy. Once again in Terminal, type (or copy and paste) the following command, being sure to change the BSD Device Name (en1 or en0) to the interface you wish to change:

openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//' | xargs sudo ifconfig en1 ether

In my example, that selects a random hexadecimal string that fits the required format and then passes that random string to ifconfig to set the MAC address.

Every time you run this command, it generates and sets a new MAC address for the chosen interface. Realize that any time you restart, the MAC addresses revert to the number originally assigned to the interface, so this is by no means permanent. Some privacy fans make this command a script, then have it run each time the Mac is rebooted. That gives them a new MAC address each time they start their computer.

One other thing: editing your MAC address may cause temporary network issues. It’s a good idea to restart that particular network connection after you change the MAC address to ensure a good connection. For Wi-Fi, that’s simple to do — just click the Wi-Fi menubar icon, select Turn Wi-Fi Off, wait a few seconds, then use the same menu to select Turn Wi-Fi On.

Steve Sande
the authorSteve Sande
Contributing Author
Steve has been writing about Apple products since 1986, starting on a bulletin board system, creating the first of his many Apple-related websites in 1994, joining the staff of The Unofficial Apple Weblog in 2008, and founding Apple World Today in 2015. He’s semi-retired, loves to camp and take photos, and is an FAA-licensed drone pilot.
Be Sociable, Share This Post!

Leave a Reply


  • Great, but that does not change the Public IP address of Mac connected to router with Ethernet cable on FTTH line.

    By Public IP I mean the one showing on sites like
    or after searching in Google
    my ip

    How to change such Public IP address? Thanks.

  • I did the commands and checked with ifconfig en0.

    Howeve, if checked with option-Wifi-Menu-Bar the MAC address continues the old one. It also shows the old one if checked with ”’networksetup -listallhardwareports”’.

    Does not seem to work on Sierra or What I am doing wrong?

  • I’m familiar with terminal commands though not an advanced user by any stretch of the imagination. I’ve followed your steps…very precisely- to change my MAC address in El Capitan. When i enter: “sudo ifconfig en1 ether 14:d2:71:11:57:a6” I’m prompted for a password. After i enter it i get “command not found” I am using my admin account and my password is good. Any suggestions would greatly help. Thanks :)

  • “Tech Tip: Finding and Changing Your MAC Address in OS X”

    OS X?

    Will this work in macOS also?

    • Do a click of WiFi icon will show a different interface name ie. mine is en0 – I assume the difference is using wireless rather than a wired connection. If you want to be confused execute ifconfig command with NO parameter to see a list of ALL interfaces. You will see 3 ‘en’ interfaces but 2 will show inactive status.

    • That was supposed to be an option/click on WIfi icon, but something got lost in my reply …

    • Hi… I’m using an iMac with a wireless connection also… running Mac OS 10.11.6

      I knew about holding the option button down :-)

      I still saw no change… I must be doing something wrong…

      ifconfig Shows en:1 Active

      I’m used to the terminal… but not an advanced terminal user.