MacOS – How to disconnect from specific WiFi network (while remembering the connection)

macosNetworkwifi

I would like to disconnect from my WiFi network on OS X Lion without having the computer to forget the network. So basically I'm looking for a way to just disconnect and connect to a specific WiFi network at will.

How do I do this?

Best Answer

You can disconnect from the current wireless network without turning wireless off by running the following command on the command line:

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z