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

Of course I know the command: iwconfig

which lists devices (and gives info about whether they have a wireless connection). For the purposes of a shell script, I'm really wondering, is there any way to list only the device names that DO have a wireless connection?

Essentially any other iw command (or something similar)... Specifically looking for solutions besides iwconfig | grep ...

share|improve this question
up vote 3 down vote accepted

Try ls /sys/class/net | grep w

share|improve this answer
YES! this is perfect! thanks – pepper Sep 6 '13 at 5:59

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.