Turn off your router.I usually turn wifi off when I’m not at my computer.
I just discovered some Apple traffic at night time
How to block that? Beside shutting down my computer..
Alas I share the router with other people that don’t have my same scheduleTurn off your router.
I usually turn wifi off when I’m not at my computer.
I have to ask: why?I usually turn wifi off when I’m not at my computer.
That may not do what you think it does. I suspect that the Wi-fi turns on again at times - either because macOS wants to do something or because it detects network traffic. Putting it sleep may help a bit, but really if you don't want the Mac doing stuff, turn it off.I usually turn wifi off when I’m not at my computer.
Why not shut it down? Nowadays, Macs don’t need to stay up overnight to perform defragmentationHow to block that? Beside shutting down my computer..
if (offset of "Off" in (do shell script "networksetup -getairportpower en0")) > 0 then
do shell script "networksetup -setairportpower en0 on"
else
do shell script "networksetup -setairportpower en0 off"
end if
if (offset of "disabled" in (do shell script "networksetup -getinfo Wi-Fi")) > 0 then
do shell script "networksetup -setnetworkserviceenabled Wi-Fi on"
else
do shell script "networksetup -setnetworkserviceenabled Wi-Fi off"
end if
Thanks @bogdanw 🥰 I already have a script that turns Wi-Fi on and off automatically assigned to a keystrokePicking up from @Slartibart's question, there are two ways to turn Wi-Fi on/off:
- just like the button in System Settings or Menu bar
networksetup -setairportpower en0 on
networksetup -setairportpower en0 off
From the manual:
“-setairportpower hardwareport on | off
Set Wi-Fi power to either <on> or <off>.”
- disable Wi-Fi completely
networksetup -setnetworkserviceenabled Wi-Fi on
networksetup -setnetworkserviceenabled Wi-Fi off
From the manual:
“-setnetworkserviceenabled networkservice on | off
Use this command to turn the specified network service on or off (enable or disable).”
With -setnetworkserviceenabled Wi-Fi off, even if -setairportpower en0 on, the Internet still doesn’t work, the message is “Please note: Wi-Fi is currently disabled”.
AppleScript, that can be saved as an app, that turns airportpower on if it’s off, and off if it’s on
AppleScript:if (offset of "Off" in (do shell script "networksetup -getairportpower en0")) > 0 then do shell script "networksetup -setairportpower en0 on" else do shell script "networksetup -setairportpower en0 off" end if
AppleScript, that can be saved as an app, that disables Wi-Fi if it’s enabled, and enables Wi-Fi if it's disabled
AppleScript:if (offset of "disabled" in (do shell script "networksetup -getinfo Wi-Fi")) > 0 then do shell script "networksetup -setnetworkserviceenabled Wi-Fi on" else do shell script "networksetup -setnetworkserviceenabled Wi-Fi off" end if
I use networksetup -setnetworkserviceenabled Wi-Fi on/off on my MBA M1.
AppleScript, that can be saved as an app, that turns airportpower on if it’s off, and off if it’s on
AppleScript:if (offset of "Off" in (do shell script "networksetup -getairportpower en0")) > 0 then do shell script "networksetup -setairportpower en0 on" else do shell script "networksetup -setairportpower en0 off" end if
It works as an application, but would it be possible to add it as a service in SystemSettings-Keyboard shortcuts-Services as I did with the older Wifi workflow I made long time ago in Sonoma? I even assigned a function key and it still works.Picking up from @Slartibart's question, there are two ways to turn Wi-Fi on/off:
- just like the button in System Settings or Menu bar
networksetup -setairportpower en0 on
networksetup -setairportpower en0 off
From the manual:
“-setairportpower hardwareport on | off
Set Wi-Fi power to either <on> or <off>.”
- disable Wi-Fi completely
networksetup -setnetworkserviceenabled Wi-Fi on
networksetup -setnetworkserviceenabled Wi-Fi off
From the manual:
“-setnetworkserviceenabled networkservice on | off
Use this command to turn the specified network service on or off (enable or disable).”
With -setnetworkserviceenabled Wi-Fi off, even if -setairportpower en0 on, the Internet still doesn’t work, the message is “Please note: Wi-Fi is currently disabled”.
AppleScript, that can be saved as an app, that turns airportpower on if it’s off, and off if it’s on
AppleScript:if (offset of "Off" in (do shell script "networksetup -getairportpower en0")) > 0 then do shell script "networksetup -setairportpower en0 on" else do shell script "networksetup -setairportpower en0 off" end if
AppleScript, that can be saved as an app, that disables Wi-Fi if it’s enabled, and enables Wi-Fi if it's disabled
AppleScript:if (offset of "disabled" in (do shell script "networksetup -getinfo Wi-Fi")) > 0 then do shell script "networksetup -setnetworkserviceenabled Wi-Fi on" else do shell script "networksetup -setnetworkserviceenabled Wi-Fi off" end if
I use networksetup -setnetworkserviceenabled Wi-Fi on/off on my MBA M1.