In Linux operating systems, unlike Windows, hardware identification often requires deeper exploration of the terminal. Users who have just installed a distribution often encounter a situation where Wi-Fi isn't working and the driver isn't automatically found. To fix this, you need to know exactly which chip is installed in your device. Equipment identification - This is the first and critical step in setting up a wireless network, without which further actions may be meaningless.
Many beginners get confused when they see abbreviations like RTL, Atheros, or Broadcom in system reports. However, this information is precisely what allows them to find the required driver in repositories or on the manufacturer's website. Standard graphical interfaces often hide technical information, displaying only the connection status. Therefore, mastering console utilities becomes essential. necessary skill For any Linux administrator or enthusiast.
In this article, we'll cover all available methods, from simple commands to system log analysis. You'll learn to distinguish between physical and logical interfaces, understand the difference between PCI and USB devices, and discover how to find information about the kernel module that controls your network card. This knowledge will allow you to resolve 90% of wireless network connection issues yourself.
Using the lspci utility for internal cards
The most common way to determine hardware specifications in Linux is to use the command lspciThis utility lists all devices connected via the PCI bus, which includes internal WiFi modules installed on the motherboard or in the Mini-PCIe slot. For the most detailed information, it is recommended to use the key -nn, which displays the numeric Vendor and Device IDs.
In the resulting list, look for lines containing the words "Network controller," "Wireless," or the names of well-known chip manufacturers. Often, the device may simply be labeled "Unassigned class," which requires additional attention. Numeric identifier (e.g. 8086:3165) is a unique key that can be used to find the exact model even if the text name is truncated or missing.
To filter the output, you can use a pipe with the grep command, which will greatly simplify finding the desired string in a long list of devices. This is especially useful on servers or systems with a large number of peripherals. Enter the command in the terminal as follows:
lspci -nn | grep -i network
If the command returns no results, this doesn't mean the WiFi adapter isn't present. It may be connected via USB (even if it's an internal card), or the kernel hasn't yet initialized the device due to a missing driver. In this case, it's worth checking the list of USB devices or consulting the system logs.
⚠️ Attention: If lspci shows a device but marks it as "Kernel driver in use: None," this is a clear indication that the driver is not loaded. You will need to manually install the firmware package or kernel module corresponding to the device ID.
Diagnosing USB WiFi adapters with lsusb
External WiFi adapters, as well as some internal modules in laptops, are connected via a USB interface. The command lsusbIt lists all connected USB devices, displaying manufacturer and product IDs, and sometimes a text description of the model. key tool For owners of dongles and those who use external antennas.
Similar to PCI, it's important to pay attention to the device ID. Often, the name only displays the manufacturer, for example, "Realtek Semiconductor Corp.", without specifying the specific chip model. In this case, the numeric code (Vendor:Product) becomes the only reliable source of information. Copy this code and enter it into a search engine along with the word "Linux driver."
To make the output easier to read, you can filter the results to include only lines related to network controllers or specific vendors. The command looks like this:
lsusb | grep -i realtek
It is also possible to obtain a more detailed tree structure of USB devices using the utility lsusb -tThis allows you to see which hub and port the device is physically located on, which can be useful when diagnosing power or bus speed issues.
- 🔍 Vendor and Product identifiers allow you to find a driver even for an unknown device.
- 📡 External adapters often require manual installation of drivers from GitHub or manufacturer websites.
- ⚡ Problems with the USB port power supply may cause unstable operation of the WiFi module.
It's worth remembering that some modern adapters support 802.11ac and 802.11ax modes, which require support from the Linux kernel version 5.x or higher. If you're using an older distribution, even the correct driver may not unlock the hardware's full potential.
Analyzing network interfaces with the ip and ifconfig commands
Once we've determined the physical presence of a device, it's useful to understand how the operating system sees it logically. Utilities ip and outdated ifconfig show network interfaces. Wireless interfaces in Linux are usually named as wlan0, wlp2s0 or wlo1The presence of the "wl" prefix often indicates a wireless device.
Team ip link show will list all interfaces. If you see an interface with the "NO-CARRIER" status or without an assigned IP address, but it's listed, it means the driver is loaded and the device is recognized. If the interface is missing entirely, the problem is kernel-level or physical. Logical name The interface will be needed for further control commands, such as connecting to a network or scanning.
To obtain specific information about wireless connections, including signal quality and current frequency, the package is used. wireless-tools. Team iwconfig (analogous to ifconfig for WiFi) will show the ESSID (network name), operating mode, and signal strength. However, in modern distributions, it is replaced by a more powerful utility. iw.
ip link show | grep wl
Using the command ip preferable because ifconfig is considered obsolete and may not reflect some modern interface characteristics. It's important to distinguish the interface state: "UP" means the interface is software-activated, but this doesn't guarantee a physical connection to the access point.
⚠️ Attention: If the interface shows as "lo" (loopback) or "eth0" (wired), but there is no WiFi, the wireless module may be blocked by software or a physical switch on the laptop case.
Checking the status of drivers and kernel modules
Knowing the adapter model is useless without understanding which driver controls the device. In Linux, drivers are often referred to as kernel modules. The command lspci -k (or lsusb -v for USB) allows you to see which driver (Kernel driver in use) is used for a specific device and which module (Kernel modules) can be loaded.
If the "Kernel driver in use" line is empty, the device is not working. The "Kernel modules" line will list compatible drivers, one of which needs to be loaded. To manage modules, use the following commands: modprobe And lsmod. Team lsmod | grep wifi will show loaded modules related to wireless communication.
It often happens that there are multiple drivers for a single chip (for example, an open source and a proprietary one). They may conflict. In this case, it is necessary to create a configuration file in /etc/modprobe.d/to prevent unnecessary modules from loading. This requires care and understanding which driver is preferred for your model.
☑️ Driver diagnostics
Also worth mentioning is the utility modinfoIt allows you to obtain detailed information about a specific driver module, including supported devices (aliases), license, and parameters. This helps ensure that the driver found is indeed compatible with your hardware ID.
Using specialized utilities lshw and inxi
For those who prefer structured and readable output, there are utilities lshw (Hardware Lister) and inxiThey collect information from various sources and present it in a convenient form. Team sudo lshw -C network will output a detailed report on network devices only, including manufacturer, product, version and driver used.
Utility inxi It's even more user-friendly and is often used on support forums for quick diagnostics. The key -N Responsible for the network. The output will contain not only the WiFi adapter model, but also the connection status, IP addresses, and the type of driver used. universal tool to quickly collect system information.
If these utilities are not on your system, they can be easily installed through your package manager. For example, on Debian/Ubuntu, this is sudo apt install lshw inxiUsing these tools saves time because it eliminates the need to remember multiple flags for standard commands.
| Team | Purpose | Access level | Informativeness |
|---|---|---|---|
lspci -nn |
List of PCI devices | User | High (ID) |
lsusb |
List of USB devices | User | Average |
lshw -C network |
Network details | Root (sudo) | Maximum |
iwconfig |
WiFi status | User | Average |
Deep analysis via dmesg system logs
When standard methods fail or provide inconsistent information, system logs come to the rescue. dmesg Outputs the kernel message buffer. Since driver loading and hardware detection occur early in the system boot process, this is where traces of the WiFi adapter's initialization can be found.
To find relevant entries, use grep with the keywords "firmware," "wifi," "wireless," or the name of the suspected manufacturer. You'll often see errors like "firmware failed to load," which indicates missing firmware files in the directory. /lib/firmware. Missing firmware is the most common reason why new WiFi adapters fail to work in Linux.
Logs can also reveal the interface name assigned to a device when it was discovered, even if it's currently inactive. This is especially useful for debugging issues with interface renaming or name conflicts.
dmesg | grep -i firmware
Log analysis requires careful attention, as the messages can be technically complex. However, the phrase "registered" or "initialized" next to the driver name is a good sign that the software is working correctly.
What should I do if dmesg shows a firmware error?
If you see an error loading the firmware, find the linux-firmware package for your distribution or download the firmware file manually from linux-firmware.git and place it in /lib/firmware.
Summary table of identification methods
To consolidate the material, it's helpful to use a pivot table, which helps you choose the right tool for the situation. Don't rely on just one method, as a combination of data provides the most complete picture.
Use lspci for initial verification, lsusb for external devices, and dmesg to find errors. Proper use of these tools transforms the diagnostic process from guesswork into a clear action plan.
Frequently Asked Questions (FAQ)
Why doesn't the lspci command show my WiFi adapter?
This could be due to several reasons: the adapter is connected via USB (use lsusb), the device is disabled in the BIOS/UEFI, or the hardware switch on the laptop case is disabled. It's also possible that the device is physically damaged.
How do I know if my adapter supports monitor mode?
Use the command iw listUnder "Supported interface modes," it should say "monitor." You can also check the chip specifications on the manufacturer's website, knowing the exact model.
Where can I find a driver if it's not in the repository?
Try to find the package linux-firmware for your distribution. If it's not there, use the device ID (from lspci/lsusb) to search on GitHub (often repositories like rtlwifi_new) or on the website linuxwireless.org.
Can Windows drivers be used on Linux?
Directly, no. However, there is a project ndiswrapper, which allows you to run Windows drivers on Linux. This is considered a temporary solution, as stability and performance are often lower than those of native drivers.