Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

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

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

6 Answers 6

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.

share|improve this answer

iwlist INTERFACE_NAME scanning

$ iwlist wlan0 scanning
share|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
iwlist device scan

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

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer

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...

share|improve this answer

Your Answer

 
discard

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