How to Change MAC Address on Mac (macOS)
In this article
Changing your Mac's MAC address (also called Wi-Fi address) can help with privacy on public networks, troubleshooting connectivity issues, or bypassing MAC-based network restrictions. This guide shows you how to do it safely on macOS, using built-in tools and a few terminal commands.
What You'll Need
- A Mac running macOS (any recent version, from Catalina to Sonoma)
- Administrator (admin) password for your user account
- Terminal app (found in /Applications/Utilities/)
- Your Wi-Fi network name (SSID) if you want to reconnect after changing
Step-by-Step
- Find your current MAC address. Click the Apple menu and select System Settings (or System Preferences on older macOS). Go to Network, select Wi-Fi on the left, then click Details. The MAC address is listed as Wi-Fi Address. Write it down – you'll need it to revert later.
- Open Terminal. Go to Applications → Utilities → Terminal. You can also press Cmd+Space, type “Terminal” and hit Enter.
- Identify your network interface. In Terminal, type
ifconfigand press Enter. Look for a line starting withen0(usually Wi-Fi) oren1(sometimes Ethernet). The MAC address appears afterether. If you have multiple interfaces, check the one that matches your Wi-Fi address from Step 1. - Turn off Wi-Fi. Click the Wi-Fi icon in the menu bar and select Turn Wi-Fi Off. Alternatively, you can use
sudo ifconfig en0 downin Terminal (replaceen0with your interface). - Change the MAC address. In Terminal, type the following command, replacing
en0with your interface and00:11:22:33:44:55with the new MAC address you want to use (use any valid MAC format, e.g.,00:1a:2b:3c:4d:5e):sudo ifconfig en0 ether 00:11:22:33:44:55
Press Enter. You'll be prompted for your admin password. Type it (it won't show as you type) and press Enter again. - Turn Wi-Fi back on. Click the Wi-Fi icon in the menu bar and select Turn Wi-Fi On. Or use
sudo ifconfig en0 upin Terminal. - Verify the change. In Terminal, type
ifconfig en0 | grep etherand press Enter. The output should show the new MAC address you set. - Reconnect to your network. Click the Wi-Fi icon and select your network. Enter the password if prompted. You should be connected with the new MAC address.
Common Mistakes
- Using the wrong interface. Changing
en1when your Wi-Fi is onen0will have no effect on your Wi-Fi MAC. - Not turning off Wi-Fi first. On many macOS versions, the change won't stick if the interface is active. Always turn Wi-Fi off before running the command.
- Using an invalid MAC address. MAC addresses must be 12 hexadecimal digits (0-9, A-F), usually formatted as six pairs separated by colons. Using characters like G or Z will cause an error.
- Forgetting to write down the original. If you don't save the original MAC, you may have trouble restoring it later. Some Macs show it on the underside or in System Information.
- Using
sudoincorrectly. If you get “command not found” or “Permission denied”, make sure you typedsudoat the beginning and entered your password correctly.
Tips
- Use a random MAC for privacy. You can generate a random one with
openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/:$//'in Terminal. - Reset to original. To revert, follow the same steps but use the original MAC address you wrote down in Step 1.
- Test before relying on it. Some networks may not allow arbitrary MACs. Test the new MAC on a public network before depending on it for access.
- Use a different MAC for each network. If you want to avoid tracking, consider using a different MAC for each Wi-Fi network you join.
- Note: macOS may reset the MAC after reboot. If you want a persistent change, you may need to create a launchd script or use a third-party tool, but that's beyond this guide.
Troubleshooting
- “ifconfig: ioctl (SIOCAIFADDR): Permission denied” – This usually means you didn't use
sudoor your password was wrong. Re-type the command withsudoand ensure you're an admin user. - Change doesn't stick after reboot. macOS resets the MAC address on reboot by default. To make it persist, you'll need to create a launch daemon or use a tool like macshift (not covered here).
- Wi-Fi doesn't connect after change. Some routers filter by MAC address. If you're on a network that only allows registered MACs, you'll need to update the router's list or revert to your original MAC.
- “Device not configured” error. This means the interface name is wrong. Run
ifconfigagain and check the correct interface for your Wi-Fi. - Can't find Wi-Fi Address in System Settings. On newer macOS, go to System Settings → Network → Wi-Fi → Details. If you don't see it, look under Hardware tab.
Frequently Asked Questions
Is changing my MAC address legal?
Yes, in most countries it's legal to change your device's MAC address for legitimate purposes like privacy. However, using it to impersonate another device or bypass access controls without permission may violate laws or terms of service.
Will changing my MAC address affect my internet speed?
No, the MAC address doesn't affect speed. It's only used for local network identification. Your speed depends on your connection and router.
Can I change the MAC address of my Ethernet port too?
Yes, the same ifconfig command works for Ethernet interfaces (usually en0 or en1). Just turn off the interface first.
Does changing MAC address hide my activity from my ISP?
No, your ISP sees your public IP address, not your MAC address. Changing your MAC doesn't hide your internet activity.
Why does my Mac show a different MAC address than the one I set?
This can happen if you didn't turn off Wi-Fi first, or if macOS reset it after a reboot. Make sure to follow the steps in order and check after reboot.
Can I set any MAC address I want?
You can set any valid MAC address (12 hex digits). However, some addresses are reserved for specific vendors or multicast, and using them may cause issues on some networks. Stick to locally administered addresses (second character is 2, 6, A, or E) for best compatibility.