How to permanently change my MAC address in macOS?
If you have Homebrew, install SpoofMAC with
brew install spoof-mac
You can also install SpoofMAC with pip
, or directly with:
git clone git://github.com/feross/SpoofMAC.git
cd SpoofMAC
python setup.py install
Add a local.macspoof.plist file in /Library/LaunchDaemons:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>MacSpoof</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/spoof-mac.py</string>
<string>set</string>
<string>ca:fe:ca:fe:ca:fe</string>
<string>en4</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Adapt the interface name and address to your need then reboot.
Then load the launch daemon:
sudo launchctl load /Library/LaunchDaemons/local.macspoof.plist
P.S.: There is a similar question Change MAC address in OS X Yosemite but the question is not about permanent change and is only for Yosemite.