▲ | bc569a80a344f9c a day ago | |||||||
Looking around briefly, you can replace it with this: `networksetup -setairportpower en0 on && [... set MAC ...] && networksetup -setairportpower en0 off` I think it's pretty safe to assume that modern Macs will always have en0 as the WiFi adapter, but if you wanted, you could use `networksetup -listnetworkserviceorder` to find the associated device. | ||||||||
▲ | JonathonW a day ago | parent | next [-] | |||||||
Modern Macs do not always have en0 as the WiFi adapter (it's en1 on current iMacs and on the Mac Studio; en0 is the ethernet jack). But you're unlikely to be taking one of the machines that has built-in ethernet to the airport or coffeeshop. | ||||||||
| ||||||||
▲ | commandersaki 12 hours ago | parent | prev [-] | |||||||
So this doesn't work if your wifi nic is associated with an SSID. `airport -z` disassociates the SSID. Can't seem to find a CLI command to do the same in macOS 26, but I haven't looked too hard either. |