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.

link|improve this question
Not programming-related - belongs on superuser.com – Paul R Apr 3 '10 at 19:49
feedback

migrated from stackoverflow.com Apr 4 '10 at 15:23

This question came from our site for professional and enthusiast programmers.

5 Answers

How about this (warning: I haven't tested this):

  1. Use iwconfig to query what the wireless interface is named
  2. iwlist eth1 scanning, scan the wireless interface "eth1"
  3. Connect via

    iwconfig eth1 essid "My Awesome Hotspot"

Side-note: You'll probably need sufficient privs to run these.

link|improve this answer
feedback

iwlist INTERFACE_NAME scanning

$ iwlist wlan0 scanning
link|improve this answer
If you don't want to type that much: $ iwlist s – phihag Apr 3 '10 at 19:23
although you might want to check out serverfault.com – Tom Dignan Apr 3 '10 at 19:23
feedback
iwlist device scan

wicd also provides a curses-based interface which allows you to easily connect to the AP of your choice.

link|improve this answer
feedback

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.

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown