It's also important to make a note of the Interface name, as you will need this information to modify your MAC address. Make sure to keep both pieces of information safe for future reference.
To open the Terminal app on your Mac, you can search for it using the Spotlight feature or go to the Applications folder, then the Utilities folder, and finally, click on Terminal. If you're new to using Terminal, don't worry, it's a powerful tool that can help you accomplish many tasks on your Mac beyond just changing your MAC address. Taking a little bit of time to get comfortable with it will be worth it in the long run.
Now that Terminal is open, there are two main options to change your MAC address. If you already have a MAC address in mind, skip stepping 4. But if you want to generate a random one, enter the following command and press Enter:
openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'
After pressing Enter, a hexadecimal number will appear on the screen. This number (in the example provided, it's 9a:3c:cd:b7:36:c4) will be the randomly generated MAC address that you can use.
To prevent any potential issues during the MAC address-changing process, it's recommended to disconnect your Mac from the internet. To do this, click the Wi-Fi icon located in the menu bar, then toggle the Wi-Fi button off. This will disconnect your Mac from any Wi-Fi networks and prevent any interruptions while changing your MAC address.
To change your MAC address, enter the following command in Terminal, replacing <interface name> with the Interface name you saw in step 1, and <MAC address> with the MAC address generated by Terminal in step 4:
sudo ifconfig <interface name> ether <MAC address>
Make sure to enter your Apple Mac computer's password when prompted. After the command runs successfully, you can reconnect to a Wi-Fi network.
Great job! Now that you know how to change your MAC address in macOS, you can use this knowledge to enhance your privacy and bypass certain restrictions on Wi-Fi networks. Remember to always use this feature responsibly and be cautious of any potential risks.