Installing WiFi Drivers on Linux: A Step-by-Step Guide

New Linux users often find themselves with a wireless adapter that doesn't work after installing the system. The lack of internet access creates a vicious cycle, as downloading drivers usually requires a connection. However, modern distributions such as Ubuntu, Fedora, and Mint contain extensive databases of proprietary modules that can be activated without manual intervention.

In most cases, the problem is resolved by connecting to the network via an Ethernet cable or USB modem, after which the system will automatically find the necessary software. However, if the automatic search fails, you will have to manually determine the chipset model and find the corresponding package in the repositories or on the manufacturer's website. In this article, we will cover all the steps: from diagnostics to forced installation.

The main difficulty lies in the diversity of vendors producing wireless controllersBroadcom, Realtek, Qualcomm Atheros, and Intel use different approaches to licensing and distributing their products. Some are completely open source, while others require closed binaries that must be properly integrated into the system kernel. Understanding these differences will save you hours of troubleshooting.

Diagnostics and identification of the adapter model

The first step should always be accurate hardware identification. Don't simply guess which driver is needed based on the laptop's name or the USB dongle's packaging. The device may contain a chip of any model, and its ID is critical to finding the right solution.

Open the terminal and enter the command lspci for internal cards or lsusb For external adapters. These utilities will list all connected devices. You need to find a line containing the words "Wireless," "Network," or "WiFi." Write down the identifier, which usually looks like a pair of hexadecimal numbers, for example, 10ec:8179.

  • 🔍 Team lspci -nnk | grep -iA3 net will show not only the model, but also the current driver status (Kernel driver in use).
  • 📝 Write down the Vendor ID and Device ID, you will need them to search the PCI ID database.
  • 🔌 If the adapter is USB, the command lsusb -v will provide more detailed information about the protocol version.

Sometimes the system sees the device but cannot match it with a kernel module. In this case, the output lspci The "Kernel driver in use" field will be empty or contain a generic driver that doesn't support WiFi. This indicates that manual installation of a specific package is required.

📊 What type of WiFi adapter do you have?
Built into the laptop
USB whistle
PCI-e card for PC
External antenna with cable
I don't know exactly

Internet connection to download packages

Before installing, make sure your distribution has access to the repositories. Without this step, the package manager won't be able to download the necessary files. The most reliable method is to use a wired Ethernet connection.

If you don't have a cable connection, you can use your Android or iOS smartphone as a USB modem. Enable "USB tethering" in your phone's settings and connect it to your computer via a cable. Linux will usually automatically detect this as a wired network and assign an IP address via DHCP.

In some cases, manual network configuration may be required if DHCP fails. Check the connection status with the command nmcli device status or via the NetworkManager graphical interface. Make sure the status is "connected."

⚠️ Note: If you're using a corporate network with web portal or certificate authentication, your connection may be blocked by security policies. In these situations, it's best to use mobile data.

Searching and installing drivers through repositories

Most popular distributions (Ubuntu, Debian, Mint) have a built-in mechanism for searching for proprietary drivers. This is the easiest and safest method, as the packages are verified by the distribution's developers for compatibility with the kernel version.

For Debian/Ubuntu based systems use the utility ubuntu-driversIt will scan your hardware and offer a list of recommended packages. Enter the command ubuntu-drivers devices in the terminal. You will see a list of available drivers marked "recommended."

sudo ubuntu-drivers autoinstall

Once the process is complete, the system will report a successful installation. For Fedora or CentOS, the equivalent command is dnf or yumFor example, Broadcom devices often require a package broadcom-wl, and for Realtek - rtl88xxau-dkms.

Vendor Typical package (Debian/Ubuntu) Typical package (Fedora/RHEL) Support status
Broadcom bcmwl-kernel-source broadcom-wl Proprietary
Realtek firmware-realtek firmware-realtek Open/Closed
Intel firmware-iwlwifi linux-firmware Completely open
Atheros firmware-atheros linux-firmware Completely open

If automatic installation doesn't help, try removing previously installed conflicting packages. Sometimes, leftover packages from previous setup attempts can block the new module from working. Use the command sudo apt purge for complete cleaning.

☑️ Checking driver installation

Completed: 0 / 5

Manually compiling drivers from source code

Situations where a ready-made package isn't available in the repository are less common, but still possible. This is especially true for new adapter models or very old devices whose support has been removed from new kernels. In this case, you'll have to compile the driver manually from the source code.

To compile, you will need development tools. Install the packages. build-essential, linux-headers (versions of your current kernel) and gitWithout kernel header files, building the module is impossible, since the compiler will not know the kernel structure.

Find the driver repository on GitHub or the manufacturer's website. The installation process is usually described in the README file. The standard procedure involves cloning the repository, running the configuration script, and compiling.

git clone https://github.com/vendor/driver-name.git

cd driver-name

make

sudo make install

After successful compilation, you need to update the list of modules and reboot the system. Command sudo depmod -a rebuilds module dependencies, and sudo reboot Apply the changes. If everything went well, the new driver should load at startup.

⚠️ Warning: Manually installed drivers may stop working when updating the system kernel (kernel upgrade). You will need to recompile them for the new kernel version if you are not using DKMS.

What is DKMS and why is it needed?

Dynamic Kernel Module Support (DKMS) is a framework that automatically recompiles kernel modules when updating them. If your driver supports DKMS, use this installation method to avoid future issues.

Troubleshooting firmware and kernel modules

Sometimes the driver itself is installed correctly, but the device won't boot due to missing firmware. Firmware is the firmware that loads into the device's memory when it's turned on. Without it, the hardware remains silent.

Check the system error log with the command dmesg | grep firmwareIf you see messages like "firmware not found" or "request firmware failed," it means the system is missing firmware files. These are usually located in the directory /lib/firmware.

Plastic bag linux-firmware Contains most of the necessary files. Make sure it is installed and up to date. If the file you need is not in the standard set, you can find it on the website linux-firmware or in non-free repositories for Debian.

  • 📂 Firmware files usually have the extensions .bin, .fw, or .ucode.
  • 🔄 After copying the files to /lib/firmware, run sudo update-initramfs -u.
  • 🚫 Don't delete old firmware files unless you're sure you don't need them—it could break other devices.

It's also worth checking if a kernel module is blocking WiFi. The command rfkill list all will show the lock status. If it says "Soft blocked: yes", unlock the device with the command rfkill unblock wifiHardware blocking (Hard blocked) is removed by a physical switch on the case.

Frequently Asked Questions (FAQ)

Why did WiFi stop working after updating Linux?

A kernel update may have changed the ABI (Application Binary Interface), making the old proprietary driver incompatible. The linux-firmware package may also have been updated, causing configuration changes. Solution: Reinstall the driver or roll back to the previous kernel version using Grub.

How can I check which driver is currently being used?

Use the command lspci -k and find the line "Kernel driver in use". You can also output lsmod | grep wifi or modinfo driver_nameto get detailed information about the loaded module.

Can Windows drivers be used on Linux?

Directly, no. However, there is a project called NDISwrapper that allows you to run Windows drivers (.sys files) on Linux. This is unstable and is considered a temporary solution when a native driver cannot be found.

Where can I find a driver for a very old adapter?

Older hardware often requires older kernel versions or specific firmware packages. Search your distribution's community forums using the exact device ID. Enthusiasts often create patches for legacy devices.