Skip to content

Instantly share code, notes, and snippets.

@tothandras
Created May 11, 2018 09:40
Show Gist options
  • Save tothandras/f8d936879ed07db7429ad874cefc47c0 to your computer and use it in GitHub Desktop.
Save tothandras/f8d936879ed07db7429ad874cefc47c0 to your computer and use it in GitHub Desktop.
Random MAC Address
# source: https://www.howtogeek.com/220462/how-to-find-and-change-your-mac-address-on-os-x/
# Find MAC Address
ifconfig en0 | grep ether
# Change it
sudo ifconfig en0 ether aa:bb:cc:dd:ee:ff
# This will generate and set a new MAC address for en0 every time you run it.
# The changes made from both these commands will be reverted when you restart, so this is not permanent.
openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//' | xargs sudo ifconfig en0 ether
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment