Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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)?

share|improve this question
It is possible to use lynx (terminal web browser) – Sneetsher Dec 17 '14 at 21:25
@Sneetsher lynx browses the web after you've got a link to the internet. This question is about creating that link to the internet. – djeikyb Dec 17 '14 at 22:34

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

man iwconfig

share|improve this answer

First, run ifconfig wlan0 up. This will enable wireless. You won't get any feedback unless there's a problem. Next, run iwlist wlan0 scan to scan for nearby wireless networks. Once you have looked at the output and know which wireless network you want to connect to, run iwconfig wlan0 essid NETWORK_ID key s:WIRELESS_KEY, replacing NETWORK_ID with the name (essid) of the nework and WIRELESS_KEY with the network passcode. Hope that helps!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.