Skip to content

Instantly share code, notes, and snippets.

@incanus
Last active August 29, 2015 14:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save incanus/366405c33d7258b25050 to your computer and use it in GitHub Desktop.
Save incanus/366405c33d7258b25050 to your computer and use it in GitHub Desktop.
OS X wifi tricks

Two useful shortcuts for managing known wifi networks on OS X.

If you've got a modern Mac with no Ethernet, your wifi interface is en0. Otherwise, it is en1, so replace that below.

alias wifils='networksetup -listpreferredwirelessnetworks en0'

This lets you list (and possibly grep) all known, previously connected wireless networks. Just type wifils.

alias wifirm='networksetup -removepreferredwirelessnetwork en0 '

This lets you remove networks from the known list, preventing connection in the future. Just type wifirm <network name>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment