How to Browse and Connect to Wireless Networks From the Command Line

Browsing available wireless networks from the command prompt requires only a single command:

Unfortunately in order to connect to a network, you need to have a network profile for it. This means that you need to have connected to it at least once before. To see what profiles you have available on your machine, use the following command:

Once you have made sure you have a profile for the network you want to connect to, you can easily connect to it using the network profile name:

That’s all there is to it.