I'm doing a project regarding RSSI and I have to retrieve the signal level of a particular WiFi SSID that I'm working on using linux command line.

I've made use of iwlist scanning command but I just couldn't get it to display the values that I want by using grep to print only the SSID name, Quality and Signal Level.

Commands that I've tried that didn't gave me the results I wanted:

  1. iwlist INTERFACE scanning essid SpecificESSID | grep Signal

  2. iwlist INTERFACE scanning essid SpecificESSID | grep ESSID,Signal

  3. iwlist INTERFACE scan | grep 'ESSID:"SpecificESSID"\|Signal level' - This almost worked but it displayed other networks signal level as well and i only need one specific network information.

1 Answer 1


First, iwlist is the old command, there's the newer iw command with more features.

If the "SSID you are working on" is the access point (AP) you are currently connected to, use

iw wlan0 station dump

pick the value(s) you are interested in (say, average signal strength), and then something like

iw wlan0 station dump | grep 'signal avg:'

For the currently connected AP, you actually have more detailed information than for all APs.

If you want signal strength for all visible APs, do something like

iw wlan0 scan | egrep 'SSID|signal'

You can post-process this for SSIDs you are interested in. Say you want SSID1 and SSID2, then you can do

iw wlan0 scan | egrep 'SSID|signal' | egrep -B1 'SSID1|SSID2'

The -B1 displays the line before the match, because in the scanning output, the signal strength comes before the SSID.

  • Thanks for guiding me. The last command helped and saved me all the troubles from looking around the web aimlessly. Mar 29, 2018 at 5:41
  • The note shown at the end of the output of iw command: Do NOT screenscrape this tool, we don't consider its output stable. is a bit unsettling.
    – nurettin
    Dec 1, 2019 at 13:17
  • 1
    @nurettin: That comment has been there for years... and even if they actually do change the format, adapting the script isn't difficult. And if you really really need to make sure it's stable, copy the binary and use it with a new name, so it doesn't get updated by the package manager. Or read the source code and write your own...
    – dirkt
    Dec 1, 2019 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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