Installing a wireless adapter in Linux-based operating systems is often the first and most challenging task for beginners, especially if the device doesn't come with ready-made drivers in the distribution's repositories. Unlike Windows, where simply connecting a USB device and waiting for automatic installation is sufficient, in a Linux environment, users often have to independently search for source code, compile kernel modules, and manually manage network subsystem configuration files.
However, the situation has changed dramatically for the better in recent years: modern distributions such as Ubuntu 22.04 or Fedora 38, have an extensive database of built-in drivers that support most chipsets from Realtek, Intel And MediaTekProblems most often arise with new adapter models released after the kernel version was released, or with devices requiring proprietary firmware files that are not distributed with open source code due to licensing restrictions.
In this guide, we'll walk you through the entire process: from hardware diagnostics to forced driver installation and configuring a static IP address via the terminal. You don't need to be an experienced system administrator, but a basic understanding of the command line will greatly simplify the process.
Hardware diagnostics and compatibility check
The first step before any driver manipulation is to accurately identify the installed or connected network hardware. The system must "see" the physical device, even if its software management has not yet been launched. For this, use the utility lsusb for USB adapters or lspci for internal cards connected via a PCIe slot.
Run the command in the terminal and carefully examine the output. You're looking for lines containing the words "Wireless," "Network," or manufacturer names like "Realtek," "Ralink," or "Atheros."
lsusb | grep -i wireless
If the adapter is defined, you will see the Vendor ID and Product ID (e.g. 0bda:b812). These codes are critical for finding the right driver online if standard methods fail. Often, a device is identified as "Unknown Device"—a sure sign that a driver is missing or that firmware needs to be downloaded.
It's also useful to check whether the kernel module responsible for Wi-Fi is loaded. Use the command lsmod in conjunction with a filter to find active network modules. No results may indicate that the module is simply not loaded, not that it's not present in the system.
⚠️ Attention: If in the outputdmesgAfter connecting the adapter, "firmware not found" errors appear. This means the driver is present, but it lacks firmware. In this case, installing a new driver won't help—you'll need to find and copy the firmware file to the directory./lib/firmware.Automatic installation via distribution repositories
The easiest and safest way to get Wi-Fi working is to use your distribution's built-in package management mechanisms. Package managers APT (for Debian/Ubuntu/Mint) or DNF (for Fedora/RHEL) can automatically find and install the required drivers from the official repositories.
In Debian-like systems, it is often necessary to enable a repository
non-free, as many Wi-Fi drivers are not entirely free software. After updating the package lists, you can try installing meta-packages containing firmware for popular chipsets.sudo apt update
sudo apt install firmware-linux firmware-realtek firmware-iwlwifiFor Ubuntu users, there's an additional feature called "Additional Drivers." The graphical interface allows you to select a proprietary driver from a list of available drivers and apply changes with one click. This is especially useful for Broadcom adapters, which often require proprietary binary modules.
☑️ Pre-installation check
Completed: 0 / 4After installing the packages, be sure to reboot the system or force load the module with the command
modprobeIf the network icon and available access points appear in the system tray after this, the problem has been resolved using standard tools.Manually compiling drivers from source code
When ready-made packages are missing or not suitable for your kernel version, you have to resort to manual compilation. This method requires installing the package build-essential (or
base-develin Arch Linux), which contains the GCC compiler and kernel header files.The process typically involves downloading an archive from GitHub or the manufacturer's website, unpacking it, and running the installation script. The key here is to ensure that the driver version matches the Linux kernel version. If the kernel has been updated but the driver was written for an older version, compilation may fail.
git clone https://github.com/path/to/driver.gitCD driver
make
sudo make installTeam
makecompiles the source code into a kernel module (.kofile), andmake installcopies it to the system modules directory. After this, you need to update the modules configuration with the commandsudo depmod -aand add the module name to the file/etc/modulesto autoload at system startup.⚠️ Attention: When manually updating the Linux kernel, installed drivers often become invalid because the new header files are incompatible with previously compiled modules. You'll have to recompile the driver after each kernel update.What to do if make gives an error?
If a compilation error occurs, installing the linux-headers package corresponding to your current kernel version often helps. Also, check if the dkms package is installed, which automatically rebuilds modules when updating the kernel.
Setting up a network using NetworkManager and Netplan
After the driver is successfully installed, the network manager takes over connection management. In most desktop distributions, this NetworkManager, which provides a graphical interface and a command-line utility
nmcli. For server versions of Ubuntu, it is increasingly used Netplan, working with YAML configurations.To check the connection status and scan for available networks in the terminal, use
nmcliThis utility allows you to connect to Wi-Fi without a graphical shell, which is indispensable when setting up servers or performing remote administration.nmcli device wifi list
nmcli device wifi connect "SSID_network" password "Your_Password"If you are using Ubuntu Server with Netplan, the configuration file is usually located in
/etc/netplan/Here you need to specify the interface name, IP acquisition method (DHCP or static), and Wi-Fi connection information. YAML syntax requires strict indentation.It's important to distinguish between the interface states: it can be "up" (connected) but without an IP address, or it can be "managed" (managed by NetworkManager). If an interface is marked as "unmanaged," NetworkManager ignores it, and the connection must be configured manually via
iporifconfig.Table of popular chipsets and driver status
Knowing which chipset is installed in your adapter allows you to immediately predict potential issues. Some manufacturers, such as Intel, are renowned for excellent Linux support, while others require more complex setup.
Chip manufacturer Adapter series Status in Linux Recommended driver Intel AX200, AC7260, 8265 Excellent (in the core) iwlwifi Realtek RTL8812AU, RTL8821CE Requires installation rtl88x2bu / rtl8821ce MediaTek MT7921, MT76 Good mt76 Broadcom BCM43xx Proprietary broadcom-sta-dkms As can be seen from the table, for chips Realtek The 88xx series most often requires manual installation of drivers from GitHub, as they are rarely included in the standard kernel out of the box. For Broadcom The situation depends on the specific model, but it often requires connecting repositories with proprietary software.
When choosing a new adapter for your Linux system, always consult the distribution's wiki pages. Buying a device with a chip MediaTek or Intel will save you hours of time on setup, while exotic Chinese brands can become a headache.
Troubleshooting and debugging
Even with properly installed drivers, conflicts can occur, especially if the system has multiple network interfaces or if power saving mode is enabled, which disables the adapter. A common problem is an unstable connection or low data transfer speed.
One of the effective diagnostic methods is viewing kernel logs in real time. The command
dmesg -wShows all system messages, including Wi-Fi driver errors, when connecting or attempting to connect. Search for keywords like "firmware," "error," and "fail."📊 What problem are you facing?Driver not foundCompilation errorWi-Fi doesn't see networksUnstable connectionIf the adapter is working but constantly loses network connection, try disabling power saving. To do this, create a configuration file in
/etc/NetworkManager/conf.d/, where the parameter is specifiedwifi.powersave = 2(which means disabling power saving mode). This often solves the problem with Realtek adapters.⚠️ Attention: Command-line interfaces and package names may vary across distributions. Always consult the official documentation for your specific Linux release, as Netplan or NetworkManager configuration methods may be updated.In complex cases, when standard utilities do not help, you can use
iw- a modern replacement for the outdatediwconfigIt allows you to manually set the channel frequency, operating mode (monitor/managed), and check the signal level in detail.FAQ: Frequently Asked Questions
Do I need internet access to install Wi-Fi drivers?
Yes, in most cases it is necessary. If the driver isn't included in the system, you'll need to download it. Use a wired Ethernet connection or share the internet from your phone via a USB modem (RNDIS mode), which Linux often recognizes as a wired network.
Why isn't Wi-Fi 6 (AX) working on my Linux?
Wi-Fi 6 support requires kernel version 5.1 or later and corresponding firmware. If you're using an older distribution (e.g., Ubuntu 18.04), you may need to manually update the kernel or upgrade to a more recent OS version.
How to roll back a driver if the system won't boot?
When GRUB loads, select "Advanced options" and run the previous kernel version. The old driver may not conflict with it. After loading, remove the problematic module or revert changes to the configuration files.
Can you use an Android phone as a Wi-Fi adapter for a PC?
Yes, this is possible via USB tethering. Connect your phone to your PC and enable "USB tethering" in Android settings. Linux will see it as a network interface (usually
usb0orrndis0), and the Internet will appear automatically.