I'm running Catalina, and the OS will always turn wifi on at boot. I've been looking into methods to turn wifi power off when I login, and I've created a .plist:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.username.wifi_off</string> <key>ProgramArguments</key> <array> <string>/Users/username/.wifi_off.sh</string> </array> <key>Nice</key> <integer>1</integer> <key>RunAtLoad</key> <true/> <key>StandardErrorPath</key> <string>/tmp/wifi_off.err</string> <key>StandardOutPath</key> <string>/tmp/wifi_off.out</string> </dict> </plist>
which is placed in
~/Library/LaunchAgents, and the file
#!/bin/sh networksetup -setairportpower en0 off
Is this quickest and/or most efficient way to disable wifi at login? How can this be extended to disable wifi at boot, so that wifi is disconnected at the login screen, before anyone has logged in?