Command-line wifi without nm-applet
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:
- iwlist scan to scan the environment for WAPs
- iwconfig ath0 essid XYZ where XYZ is the ESSID from the scan that you want to connect to
- ifconfig ath0 up (turns the interface on)
- 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.)