1. Introduction

Wireless networks are one of the primary methods we use to access the internet. Regular monitoring of the WiFi connection information is sometimes necessary, especially in moments when the internet speed fluctuates.

The WiFi information can be easily displayed in Linux using a few command-line tools. These tools provide information such as the name of the wireless network, the signal strength, and the IP address assigned to the device.

In this tutorial, we explore the different methods to display wireless network and driver information.

2. Displaying Wireless Card Chipset and Driver Information

We can use the lspci utility to display information about PCI buses in the system and any connecting devices.

By default, it displays a small list of devices:

$ lspci
00:00.0 Host bridge: Intel Corporation Device 9b61 (rev 0c)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics (rev 02)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)
00:12.0 Signal processing controller: Intel Corporation Comet Lake Thermal Subsytem
00:14.0 USB controller: Intel Corporation Device 02ed
00:14.2 RAM memory: Intel Corporation Device 02ef
00:14.5 SD Host controller: Intel Corporation Device 02f5

However, we can use different options to request more verbose outputs.

Let’s combine the lscpi command, and the grep command to identify the wireless network card manufacturer:

$ sudo lspci | grep -i wireless
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTLxxxxCE xxx.11ac PCIe Wireless Network Adapter

We’re using a pipe to combine the lspci command with the grep command. The -i option specifies ignore case.

We can also output the wireless card driver information:

$ sudo lspci -v -s 02:00.0 | grep -i 'kernel'
Kernel driver in use: rtw_xxxxce
Kernel modules: rtwxx_xxxxce

The -v option produces a more verbose output, while the -s option only shows devices in a specific domain. Here, we’re using the 02:00.0 domain because it’s the identifier of our wireless network card. The domain value may vary in different systems. So it’s good practice to first identify the wireless network card.

We can also use the ethtool utility to display wireless driver and firmware version information. However, we need to first output all network interfaces using the ip command:

$ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp1s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether f8:0d:ac:28:58:9b brd ff:ff:ff:ff:ff:ff
3: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
    link/ether xx:xx:xx:xx:18:d9 brd ff:ff:ff:ff:ff:ff

Here, the third interface wlp2s0 represents the current wireless network interface.

We can then use this value to query for the wireless driver and firmware information:

$ sudo ethtool -i wlp2s0
driver: rtw_8822ce
version: 5.15.0-58-generic
firmware-version: N/A
bus-info: 0000:02:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no

We’re using the -i option to specify the driver name.

3. Using nmcli

The nmcli command-line utility is a tool for controlling NetworkManager and reporting the network status. We can use it in the creation, deletion, activation, and deactivation of network connections. Furthermore, we can also control and display the network device status.

Let’s view all the available wireless networks:

$ sudo nmcli dev wifi
[sudo] password for redward: 
IN-USE  BSSID              SSID                  MODE   CHAN  RATE        SIGNAL  BARS  SECURITY  
        6C:14:6E:E5:35:F4  HUAWEI-5G-Jah3        Infra  149   270 Mbit/s  70      ▂▄▆_  WPA2      
*       C8:3A:35:58:B2:60  Full Bars             Infra  6     270 Mbit/s  69      ▂▄▆_  WPA1      
        6C:14:6E:E5:35:F0  Zero hour             Infra  8     130 Mbit/s  60      ▂▄▆_  WPA2      
        D8:32:14:46:81:E8  Allan                 Infra  6     270 Mbit/s  17      ▂___  WPA1 WPA2 
        F0:2F:A7:CC:69:40  Reinhard              Infra  6     270 Mbit/s  15      ▂___  WPA1 WPA2 
        06:1F:5C:FE:AA:DF  HUAWEI Y7 Prime 2018  Infra  11    65 Mbit/s   10      ▂___  WPA2  

We can view information such as SSIDs, channels, transfer rates, signal strength, etc. The asterisk indicates the wireless network we are currently connected to.

Alternatively, we can use this command to display even more information about available wireless networks:

$ nmcli -f ALL dev wifi
NAME   SSID                  SSID-HEX                                  BSSID              MODE   CHAN  FREQ      RATE        SIGNAL  BARS  SECURITY
AP[1]  Full Bars             46756C6C2042617273                        C8:3A:35:58:B2:60  Infra  6     2437 MHz  270 Mbit/s  70      ▂▄▆_  WPA1
AP[2]  Zero hour             5A65726F20686F7572                        6C:14:6E:E5:35:F0  Infra  8     2447 MHz  130 Mbit/s  59      ▂▄▆_  WPA2
AP[3]  HUAWEI-5G-Jah3        4855415745492D35472D4A616833              6C:14:6E:E5:35:F4  Infra  149   5745 MHz  270 Mbit/s  47      ▂▄__  WPA2
AP[4]  Reinhard              5265696E68617264                          F0:2F:A7:CC:69:40  Infra  6     2437 MHz  270 Mbit/s  22      ▂___  WPA1
AP[5]  HUAWEI Y7 Prime 2018  485541574549205937205072696D652032303138  06:1F:5C:FE:AA:DF  Infra  11    2462 MHz  65 Mbit/s   15      ▂___  WPA2

The output above shows the wireless network details in a tabular view. However, we can switch to a multiline view using the -m multiline option:

$ nmcli -m multiline -f ALL dev wifi
NAME:                                   AP[1]
SSID:                                   Full Bars
SSID-HEX:                               46756C6C2042617273
BSSID:                                  C8:3A:35:58:B2:60
MODE:                                   Infra
CHAN:                                   6
FREQ:                                   2437 MHz
RATE:                                   270 Mbit/s

4. Using iwconfig

The iwconfig utility is a tool for setting parameters of the network interface which are specific to the wireless operation. It’s only dedicated to wireless interfaces and not wired connections such as LAN or Ethernet cables.

We can also use it to display the parameters as well as the wireless network statistics available in the /proc/net/wireless directory.

Furthermore, it can change the parameters, like transmit power, the bit rate, the SSID name, and more of the network interface related to Wi-Fi adapters.

Running the iwconfig command without any arguments displays the current wifi connections on the system:

$ iwconfig
lo        no wireless extensions.

enp1s0    no wireless extensions.

wlp2s0    IEEE 802.11  ESSID:"Full Bars"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: C8:3A:35:58:B2:60   
          Bit Rate=300 Mb/s   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=53/70  Signal level=-57 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:162   Missed beacon:0

However, we can pass the name of the wireless network for specific information:

$ iwconfig wlp2s0
wlp2s0    IEEE 802.11  ESSID:"Full Bars"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: C8:3A:35:58:B2:60   
          Bit Rate=162 Mb/s   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=43/70  Signal level=-67 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:79   Missed beacon:0

5. Using iwlist

The iwlist utility displays additional information, such as wifi quality and signal strength or level from a wireless network interface. This information isn’t displayed by the iwconfig command.

It’s available by default on most Linux distros.

Let’s use the iwlist command to display information about our wireless network interface:

$ sudo iwlist wlp2s0 scan
wlp2s0    Scan completed :
          Cell 01 - Address: C8:3A:35:58:B2:60
                    Frequency:2.437 GHz (Channel 6)
                    Quality=55/70  Signal level=-55 dBm  
                    Encryption key:on
                    ESSID:"Full Bars"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                              24 Mb/s; 36 Mb/s; 54 Mb/s
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s

6. Using wavemon

The wavemon utility is an ncurses-based monitoring application for wireless network devices. It shows network statistics in real-time and also shows wireless and network device information.

It splits the network information into different screens, each screen displaying specific information about the wireless network.

We can install wavemon through the local package manager:

$ sudo apt install wavemon

We can verify if it’s successfully installed by checking its version using the -v option:

$ wavemon -v
wavemon 0.8.2
Distributed under the terms of the GPLv3.

Alternatively, we can also use the dnf or yum package manager to install wavemon in RHEL-based Linux distros:

$ sudo yum -y install wavemon

Let’s use the wavemon command to display real-time network information:

wavemon output

From the window above, we have different options available to us. For example, pressing the F2 key will display the network information in histogram format.

7. Using GNOME NetworkManager Interface

GNOME and several other Linux distros can use the operating system’s NetworkManager to maintain an active network connection. The main purpose of the NetworkManager is to make the networking setup and configuration as seamless and automatic as possible.

It displays all available networks, and we can easily switch between them. Wireless networks with encryption require us to enter a passphrase or password before connecting. It automatically stores the passwords for encrypted networks for easier reconnection later.

To access the NetworkManager, let’s press the window button on the keyboard and then search for “wifi“:

wifi search

Clicking on the suggested Wi-Fi option under settings opens up a window with names of available wireless networks:

wifi network interface

We can only view more information for wireless networks that we are currently connected to.

Let’s click on the cog icon on the current active wireless network to view more information about it:

wireless network info

We have information on signal strength, link speed, security, and much more. We can also switch through the different tabs to view detailed information on the network identity, IPv4, IPv6, and security.

8. Conclusion

In this article, we’ve explored different methods to display wireless network information. We first output the wireless chipset and driver information using the lscpi and ethtool commands. Then, we used tools such as nmcli, iwconfig, wavemon to display the wireless network information.

Each method has its advantages and disadvantages in displaying wireless network information. The method to use mostly depends on what results we’re trying to achieve or monitoring specific metrics.

Comments are closed on this article!