Skip to content

Instantly share code, notes, and snippets.

@gotbadger
Created January 19, 2015 17:11
Show Gist options
  • Save gotbadger/2a67466df091512e96a2 to your computer and use it in GitHub Desktop.
Save gotbadger/2a67466df091512e96a2 to your computer and use it in GitHub Desktop.
Change mac address OSX to something random
NEW_MAC_ADDRESS=$(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')
echo Mac changed to $NEW_MAC_ADDRESS
sudo ifconfig en0 ether $NEW_MAC_ADDRESS
ifconfig en0 |grep ether
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment