Source: Connect to a wireless network via command line
I know, the first thing you are asking is “Why would I want to have to connect to a wireless network from the command line?†To that question I can give you a simple answer…What if you want to create a script to run that will bring up your wireless network as soon as your desktop is loaded? You could get really complex and create a start up script to load a desktop based on what wireless access point you needed to join. That's one of the beauties of Linux, if you can dream it, you can do it.
I know, the first thing you are asking is “Why would I want to have to connect to a wireless network from the command line?†To that question I can give you a simple answer…What if you want to create a script to run that will bring up your wireless network as soon as your desktop is loaded? You could get really complex and create a start up script to load a desktop based on what wireless access point you needed to join. That's one of the beauties of Linux, if you can dream it, you can do it.