Is there a CLI command or program that will list available wireless access points? I'm running Ubuntu 9.04 on a laptop and sometimes I boot straight into the CLI instead of a GUI. I know iwconfig can configure a connection but will not list available AP's.
6 Answers
How about this (warning: I haven't tested this):
- Use
iwconfig
to query what the wireless interface is named iwlist eth1 scanning
, scan the wireless interface "eth1"Connect via
iwconfig eth1 essid "My Awesome Hotspot"
Side-note: You'll probably need sufficient privs to run these.
iwlist INTERFACE_NAME scanning
$ iwlist wlan0 scanning
-
If you don't want to type that much: $ iwlist s– phihagApr 3, 2010 at 19:23
-
although you might want to check out serverfault.com– Tom DignanApr 3, 2010 at 19:23
iwlist device scan
wicd also provides a curses-based interface which allows you to easily connect to the AP of your choice.
If you happen to use wpa_supplicant, wpa_cli comes in very handy. You run:
wpa_cli scan
And then:
wpa_cli scan_results
This produces a list of APs with some additional information.
If NetworkManager is running then you can use nm-tool
, and read everything from the line containing Wireless Access Points
all the way to the next empty line.
Additionally, you can use dbus-send
to communicate with it over D-Bus, but there is no straightforward way to just get all access points visible to all wireless interfaces.
I use ceni (http://manual.aptosid.com/en/inet-ceni-en.htm) - it is a curses interface to various networking setups, including both wired and wireless. I've found it installed on AntiX Linux (a Debian derivative) so it may well exist or be installable under Ubuntu.
As of RHEL-related OS I haven't found a RPM package for it...