Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to get a list of wireless networks nearby while the adapter is acting as an access point but iwlist returns the following error:

$ sudo iwlist wlan0 scan
wlan0     Interface doesn't support scanning : Operation not supported

Is there another way of getting this list, perhaps with another utility? My Tomato powered WRT54 seems to be able to achieve this (listing nearby APs while the device itself is set up as an AP), so I'm curious how I could replicate that behaviour.


share|improve this question
up vote 6 down vote accepted

iwlist is seriously deprecated. Remove it from your system and never use it again. Do the same with iwconfig, iwspy. Those tools are ancient and were designed in an era where 802.11n didn't exist. Kernel developers maintain a ugly compatibility layer to still support wireless-tools, and this compatibility layer often lies.

Now install iw if not already done. The iw command you are looking for is

iw dev wlan0 scan ap-force.

This is a fairly recent addition. Not all drivers support this, but most should do.

share|improve this answer
Thanks, I was completely unaware that iwlist was deprecated! I had to compile iw from source, as the version I had in my distro was too old, but after that I was able to retrieve the AP list. – Hamza May 21 '14 at 21:28
@BatchyX - There is no package called iw, at least not on Debian Wheezy. Where can I get this iw ? – Martin Vegter Dec 20 '14 at 0:24

I encountered this issue when my wifi device was in 'Access Point' Mode. I changed mode to 'client'. Then command started working perfectly. Command works with 'ad-hoc' mode as well.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.