Skip to content

Instantly share code, notes, and snippets.

@ngsctt
Created April 27, 2018 07:21
Show Gist options
  • Save ngsctt/ec736719dec951b00fdcc473c1d63d15 to your computer and use it in GitHub Desktop.
Save ngsctt/ec736719dec951b00fdcc473c1d63d15 to your computer and use it in GitHub Desktop.
Toggle WiFi power (macOS)
#!/bin/bash
if [[ $(networksetup -getairportpower en0) == *On ]]
then
networksetup -setairportpower en0 off
else
networksetup -setairportpower en0 on
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment