Hey all,
I am looking for a way to turn Wi-Fi on/off using some commands or running some scripts. Can anyone suggest a way to do this?
You can turn Wi-Fi off using a single line command:
networksetup -setairportpower $AIRPORT off
To turn on, simply replace off with on.
27 December 2021