Ubuntu – Get details about the Connected WiFi Network

debiannetworkingwireless

I'm trying to get the details of the WiFi network that I've connected to. I have already tried iwlist wlan0 scan which give the details of the connected network as well as all the available networks too. And it also take nearly 5 seconds to get the data in the terminal. I also tried iw dev wlan0 link which gives the exact details that I required but it lacks to provide the signal quality (in percentage). So is there any command which would give the details of the wifi network like Essid Name, Address, Signal Quality, Signal Strength(RSSI).

Commands I've tried:

sudo iwlist wlan0 scan,
the output is

          wlan0     Scan completed :
          Cell 01 - Address: 30:5A:3A:9B:4A:A2
                    Channel:6
                    Frequency:2.437 GHz (Channel 6)
                    Quality=56/70  Signal level=-54 dBm 
                    Encryption key:off
                    ESSID:"Innova1"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
                              36 Mb/s; 48 Mb/s; 54 Mb/s
                    Mode:Master
                    Extra:tsf=000000012e7f4a65
                    Extra: Last beacon: 200ms ago
                    IE: Unknown: 0007496E6E6F766131
                    IE: Unknown: 010482848B96
                    IE: Unknown: 030106
                    IE: Unknown: 072A494E000101100201100301100401100501100601100701100801100901100A01100B01100C01100D0110
                    IE: Unknown: 2A0100
                    IE: Unknown: 32080C1218243048606C
                    IE: Unknown: 2D1A2C0103FF00000000000000000000000000000000000000000000
                    IE: Unknown: 3D1606000400000000000000000000000000000000000000
                    IE: Unknown: DD180050F2020101810003A4000027A4000042435E0062322F00**

Another Command is sudo iw dev wlan0 link,

the output is
**

Connected to 30:5a:3a:9b:4a:a2 (on wlan0)
SSID: Innova1
freq: 2437
RX: 18079342 bytes (101462 packets)
TX: 2279813 bytes (17536 packets)
signal: -58 dBm
tx bitrate: 43.3 MBit/s MCS 4 short GI
bss flags:  short-preamble short-slot-time
dtim period:    2
beacon int: 100**

Best Answer

You can try nmcli d wifi which does not require sudo privilege. This gives some of the information you want, and lists all networks, but the connected one has an asterisk so you can use grep to get only the headers and the line you want like so:

$ nmcli d wifi | grep ^\*
*  SSID                    MODE   CHAN  RATE       SIGNAL  BARS  SECURITY         
*  SKY5952D                Infra  11    54 Mbit/s  73      ▂▄▆_  WPA2 
Related Question