Skip to content

Instantly share code, notes, and snippets.

@thesauri
Created February 22, 2022 15:38
Show Gist options
  • Save thesauri/022a307234eb3296fae6487cacc1fc1f to your computer and use it in GitHub Desktop.
Save thesauri/022a307234eb3296fae6487cacc1fc1f to your computer and use it in GitHub Desktop.
Change MAC address macOS 12 Monterey

Change MAC address in macOS Monterey

I was unable to change the MAC address of the Wi-FI device on a MacBook Air (M1 2020) running macOS Monterey due to the following error: ifconfig: ioctl (SIOCAIFADDR): Can't assign requested addres.

By running the commands in following sequence I was able to change it successfully:

  1. Turn WiFi device off
  2. Turn the WiFi device on again: networksetup -setairportpower en0 on
  3. Change the MAC: ifconfig en0 ether <mac-address-here>
  4. Run: networksetup -detectnewhardware
@mbierman
Copy link

@phush0 if you are referring to the script I posted, let's move the discussion there. If not, please ignore. :)

@Wafeeqrox
Copy link

config: ioctl (SIOCAIFADDR): permission denied what does this mean?

@Nsure45
Copy link

Nsure45 commented May 11, 2024

If you change en0 to en1 I noticed it bypasses things such as Internet parental controls. But if you use en0 it doesn't work. Is this because en0 is the ethernet Mac address and en1 is the WIFI MAC address?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment