Easily spoof your MAC address in OS X & Linux
I made this because changing your MAC address in OS X is harder than it should be. The Wi-Fi card needs to be manually disassociated from any connected networks in order for the change to apply correctly – super annoying! Doing this manually each time is tedious and lame.
Instead, just run
spoof and change your MAC address in one command. Now for Linux, too!
Here are some easy install instructions for complete beginners.
Install node.js (it's a programming platform like Python, Java, etc.)
Open Terminal. Let's use Spotlight to find it.
- Install spoof by typing this command and pressing
sudo npm install spoof -g
That's it! spoof is installed.
- Now, let's print out the help page. Just like before, run this command in Terminal.
- Now, let's print out all our network devices.
- Find the device you want to set or randomize the MAC address for in the list. Wi-Fi is usually called
en0on modern Macs. Then, run this command:
sudo spoof randomize en0
You may need to reconnect to the Wi-Fi hotspot you were connected to. But, that's it! Your MAC address is changed. You can confirm by re-running:
You can always see up-to-date usage instructions by running spoof --help.
spoof list- "Ethernet" on device "en0" with MAC address 70:56:51:BE:B3:00- "Wi-Fi" on device "en1" with MAC address 70:56:51:BE:B3:01 currently set to 70:56:51:BE:B3:02- "Bluetooth PAN" on device "en1"
spoof list --wifi- "Wi-Fi" on device "en0" with MAC address 70:56:51:BE:B3:6F
You can use the hardware port name, such as:
spoof randomize wi-fi
or the device name, such as:
spoof randomize en0
spoof set 00:00:00:00:00:00 en0
While not always possible (because sometimes the original hardware MAC
isn't available), you can try setting the MAC address of a device back
to its burned-in address using
spoof reset wi-fi
(older versions of OS X may call it "airport" instead of "wi-fi")
On OS X, another option to reset your MAC address is to simply restart your computer. OS X doesn't preserve changes to your MAC address between restarts.
If you need Windows support, consider using the Python version of this program, SpoofMAC. Or, please send a PR with Windows support and I'll accept it. You can see how it's implemented in the Python version. Thanks!
If you want to set your MAC address and have it persist between restarts on OS X, consider using the Python version of this program, SpoofMAC, and following the instructions for running automatically on startup.
MIT. Copyright Feross Aboukhadijeh.