Changing the MAC address of a Mac running macOS is pretty straightforward, and all you need for this is the Terminal. Follow the steps below to learn how.
Open Terminal.
Enter the following command to know the MAC addresses currently assigned to your current network interfaces: ifconfig. Make sure to note the original MAC address down somewhere. en0 represents Ethernet, whereas en1 denotes wireless network (Wi-Fi).
If you’ve already got a MAC address in mind to assign to your Mac, skip to the next step. However, if you don’t, use type the following command into the Terminal to generate one: openssl rand -hex 6 | sed ‘s/\(..\)/\1:/g; s/.$//’.
Disconnect the network connection for which you want to change the MAC address.
In the Terminal, enter sudo ifconfig en0 ether 21-A5-CE-DC-C2-33. Subsequently, enter your password and hit return. Replace the MAC address with the one you want to assign to your Mac. Similarly, replace en0 with en1 if you wish to change the MAC address for your Wi-Fi network.
Once that’s done, turn on your Mac’s Wi-Fi and type ifconfig to verify if the MAC address is changed successfully. Do note that the MAC address defaults back to the original MAC address upon every boot. As such, if you need to change your MAC address every time you use it, you can create a script that does it for you each time the system boots up.