Is there a simple command to find out to which Wi-Fi AP I am connected?
I have several networks configured in my
/etc/wpa_supplicant.d/wpa_supplicant.conf, with assigned priorities, and depending where I am I connect to the best available Wi-Fi/SSID. Connection happens automatically, so I don't know to which SSID I am connected.
Now I need to check (inside a script) whether I am connected at home, or somewhere else.
I know that I can list all available SSIDs with
iwlist wlan0 scan
But how can I print the SSID to which I am connected at the moment?
I am using Debian.