Your command is correct, once you've prepared the network to be changed. Temporarily power down the WiFi before changing the address.
Doesn’t work on newer macbooks (2018 and later)
networksetup -setairportpower en0 off
Modify the mac address with the desired value:
sudo ifconfig en0 ether 88:63:11:11:11:11
Finally, turn on the WiFi
networksetup -setairportpower en0 on
I verified with Catalina 10.15.4 and 10.15.5
uname -a
Darwin iMac.local 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64
sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.5
BuildVersion: 19F101
sudo ifconfig en0 down
sudo ifconfig en0 ether xx:xx:xx:xx:xx:xx
sudo ifconfig en0 up
? – Todd Apr 14 '20 at 23:46ifconfig: ioctl (SIOCAIFADDR): Device power is off
– gmw Jul 16 '22 at 08:29networksetup -setairportpower en0 on
and then useifconfig
. – elulcao Jul 17 '22 at 19:15