I'm using wpa_supplicant to connect to my wifi network. Since I'm using dwm, I want to show the SSID of the connected network in the panel. Is there a way to get the SSID of the connected network in wpa_supplicant?


You can do this using iwgetid from the wireless_tools package:

pacman -S wireless_tools

Then run

iwgetid -r

You can get the current SSID with wpa_cli which is part of the wpa_supplicant package. No need to install wireless_tools...

wpa_cli status will spew out info of the current network. Just look for the ssid value in the output.

  • Failed to connect to non-global ctrl_ifname: (nil) error: No such file or directory. The accepted answer worked though. – Boris Sep 26 '20 at 17:36

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.