It's FOSS published a tutorial about connecting to WiFi from the terminal in Ubuntu Linux.
How to Connect to WiFi from the Terminal in Ubuntu Linux
Learn to connect to wireless network from the terminal in Ubuntu. This is specially helpful when you are using Ubuntu server stuck with command line.
How to Connect to WiFi from the Terminal in Ubuntu Linux