HOWTO: Use IWLIST
Iwlist is one of the wireless tools typically available on most (hopefully all) GNU/LInux distros. You can use iwlist to view lots of good information about your wireless card and its connectivity.
Typing iwlist by itself yeilds the following help text:
Usage: iwlist [interface] scanning
[interface] frequency
[interface] channel
[interface] bitrate
[interface] rate
[interface] encryption
[interface] key
[interface] power
[interface] txpower
[interface] retry
[interface] ap
[interface] accesspoints
[interface] peers
[interface] event
Following this, I can see what channel I’m on by typing:
- iwlist wlan0 channel
Which shows me:
- jon@jonzbox:~$ iwlist wlan0 channel
wlan0 11 channels in total; available frequencies :
Channel 01 : 2.412 GHz
Channel 02 : 2.417 GHz
Channel 03 : 2.422 GHz
Channel 04 : 2.427 GHz
Channel 05 : 2.432 GHz
Channel 06 : 2.437 GHz
Channel 07 : 2.442 GHz
Channel 08 : 2.447 GHz
Channel 09 : 2.452 GHz
Channel 10 : 2.457 GHz
Channel 11 : 2.462 GHz
Current Channel=7
Notice that not only does it tell me what frequencies are associated with what channels (this is a wireless B card), but it also tells me what channel I am on now (7).
Playing around further, I can type:
- iwlist wlan0 encryption
Which returns:
- jon@jonzbox:~$ iwlist wlan0 encryption
wlan0 3 key sizes : 40, 104, 232bits
4 keys available :If I do the same command as root, I get more information:
- jon@jonzbox:~$ sudo iwlist wlan0 encryption
wlan0 3 key sizes : 40, 104, 232bits
4 keys available :
[1]: 8FB2-6575-D77E-8AEE-6342-3365-1D (104 bits)
[2]: off
[3]: off
[4]: off
Current Transmit Key: [1]
Security mode:openI’ve munged my key just in case you come within 1,000 feet of my house.
In short, iwlist is useful for seeing many interesting things about how your wireless NIC sees the world. It’s useful in troubleshooting if you need to see your key or channel quickly, and it can be fun as well (check out the scanning option).
Related Stories
POSTED IN: How To
1 opinion for HOWTO: Use IWLIST
New Linux User » Geeky Fun: Logging On To Darkstar
Mar 2, 2006 at 9:36 am
[…] My Linkysys wifi card was recognized as eth0. A simple iwconfig eth0 key and a dhcpcd brought it up. You may have to do more (since my Dlink PCI wifi card in the desktop upstairs is still failing to come up) and might want to check out my posts on iwconfig and iwlist. […]
Have an opinion? Leave a comment: