I want to connect to a free open wifi, like Starbucks, but I don't want a full-fledged desktop gui like Unity or GNOME. How can I do this via command-line (pretending my install base is Ubuntu Server + drivers for my wifi card)?
you can use iwconfig. I have done it with wep. normally this is enough
iwconfig ethX essid ESSID key open XXXXXXXXXX
and then call the dhcp client with dhclient3 ethx
I'm doing this from memory. But check the manual of iwconfig for more info