Skip to content

Instantly share code, notes, and snippets.

@philoserf
Last active October 2, 2023 12:44
Show Gist options
  • Save philoserf/d774990d6ce9e5d5a633012030b94adc to your computer and use it in GitHub Desktop.
Save philoserf/d774990d6ce9e5d5a633012030b94adc to your computer and use it in GitHub Desktop.
new-mac-address
printf "starting mac addr: %s\n" "$(ifconfig en0 | grep ether)"
ifconfig en0 ether "$(openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/./0/2; s/.$//")"
printf "new mac addr: %s\n" "$(ifconfig en0 | grep ether)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment