jlm-blog
~jlm

26-May-2009

Command-line wifi without nm-applet

Filed under: linux — jlm @ 13:43

If you use a Linux laptop, you probably have an ambivalent relationship with nm-applet, “Network Manager”, that thing which connects to your access points. Or often doesn’t, because — well, no one knows why, because nm-applet is fussy and tight-lipped.
Fortunately, you can do everything it does in the shell, if you know how. Here’s how:

  1. iwlist scan to scan the environment for WAPs
  2. iwconfig ath0 essid XYZ where XYZ is the ESSID from the scan that you want to connect to
  3. ifconfig ath0 up (turns the interface on)
  4. dhclient (registers with the WAP and gets an address)

Voilà, you’re connected (or at least have a meaningful error message), while nm-applet is still running around flailing its arms.
(I used ath0 as the interface in my example, but your interface might have a different name, like wifi0 or wlan0. Check by running ifconfig. Interface-affecting commands require root.)

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress