Another one liner you can use for macOS:
sudo ifconfig en0 ether $(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')
You can always get your original MAC address from About This Mac > System Report > Network > Locations > Hardware (MAC) Address