How to Install a Wi-Fi Driver on Ubuntu: A Step-by-Step Guide

Experiencing no wireless connection immediately after installing Linux is a classic problem that can confuse even an experienced user. Ubuntu It is renowned for its excellent out-of-the-box hardware support, but rare network cards or newer laptop models often require manual installation. firmware or kernel modules. Without a working internet connection, the process seems like a vicious circle: the driver needs the network, and the network needs to download the driver.

Fortunately, there are several proven methods for solving this problem, from using a temporary USB connection to manually compiling modules. In this article, we'll walk you through all the steps of diagnosing and installing the necessary software for your network card. You'll learn how to identify the exact adapter model, find the appropriate packages, and activate them in the system.

The first thing you need to do before starting any manipulations is to make sure that the problem lies in the missing driver and not in a disabled hardware switch. Many laptops have physical keys or combinations of keys. Fn + F-key, which block the module's operation at the BIOS level. Check the indicators on the device's case and ensure that airplane mode is not activated in the system interface, if it is even partially displayed.

Network adapter identification

Before looking for a solution, it's important to know exactly what kind of hardware we're dealing with. Linux has a powerful tool lspci for devices connected via the PCI bus, and lsusb For external or built-in USB adapters, launch the terminal and enter the following command to list all connected PCI devices, filtering out only network controllers.

lspci -nnk | grep -i net -A2

In the output you will see lines containing vendor and device IDs, for example Realtek Semiconductor Co., Ltd. or Intel CorporationPay special attention to the line Kernel driver in use: If it's missing, then the kernel module is indeed not loaded. It's also helpful to check the list of USB devices if your adapter is external, using the command lsusbto see the manufacturer ID.

Write down the device ID, which usually looks like a pair of numbers separated by a colon, such as 8086:31dcThese numbers are the key to finding the correct driver in the repositories or on the manufacturer's website. Knowing the exact chip model (for example, RTL8821CE or BCM43xx), you will be able to find specific instructions, as there is no universal solution for all cards.

  • 🔍 Use lspci -v to obtain detailed information about interrupts and device memory.
  • 📝 Write down the Vendor ID and Device ID for later searching in the PCI database.
  • 💻 Check the output dmesg | grep firmware for microcode loading errors.

⚠️ Note: Some adapters may be detected by the system as an unknown device. In this case, checking the hardware ID against the official documentation from the laptop manufacturer will help avoid installing incompatible software.

📊 What network adapter do you have?
Intel
Realtek
Broadcom
MediaTek
Don't know

Preparing the system and temporary network access

Since Wi-Fi isn't working yet, you'll need an alternative internet connection to download packages. The most reliable method is to use an Android or iOS smartphone in USB tethering mode. Connect your phone to your computer with a cable, enable "USB tethering" in your mobile network settings, and Ubuntu will automatically recognize it as a wired Ethernet connection.

If you don't have the opportunity to use a smartphone, you can download the necessary .deb packages on another computer and transfer them via flash drive. However, this method is less convenient due to possible dependencies, which would also have to be downloaded manually. Therefore, it is recommended to find a way to temporarily extend the internet connection to the problematic machine.

Ensure the repositories are up to date by running the update package lists command. This is a critical step, as older lists may not contain links to the latest versions of drivers or management utilities. In Debian-based distributions, this is done using the utility apt.

sudo apt update && sudo apt upgrade

In parallel, it's worth installing a basic set of compilation tools if you need to build from source. Packages build-essential, dkms and kernel header files linux-headers-generic are the foundation for the successful installation of most proprietary modules. Without them, the installation process will fail at the compilation stage.

☑️ Preparing the environment

Completed: 0 / 4

Using additional Ubuntu drivers

The easiest and safest way for beginners is to use the built-in driver management utility. Ubuntu scans your hardware and offers to install proprietary modules if they're available in the official repositories. This mostly applies to Broadcom cards and some older NVIDIA models, but it's worth trying first.

Open the application menu and find "Software & Updates." Go to the "Additional Drivers" tab. The system will search for suitable software and, if it finds it, will prompt you to select it from the list. Simply select "Use..." and click "Apply Changes."

The process may take several minutes as the system downloads and installs the necessary components. After successful installation, a reboot or at least a restart of the NetworkManager service will be required. This method is advantageous because the installed packages are signed with Ubuntu digital keys and are guaranteed not to impact system stability.

  • 🚀 This method automatically resolves dependency issues.
  • 🛡️ Only tested and stable versions of modules are installed.
  • 🔄 Driver updates will occur along with the system update.

⚠️ Note: If the Additional Drivers list is empty, this means there is no proprietary driver for your hardware in the Ubuntu repositories. In this case, you will need to install it manually or use DKMS.

Manual installation via DKMS and Git

Modern adapters, especially those from Realtek and MediaTek, often require driver installation via DKMS (Dynamic Kernel Module Support). This allows modules to be automatically rebuilt when the Linux kernel is updated. The process begins with cloning the driver's source code repository from GitHub.

Find the repository that matches your chip model. For example, popular Realtek cards often use repositories from lwfinger or morrownrCopy the repository address and use git to download files to your computer. Make sure you have the package installed. git.

sudo apt install git

git clone https://github.com/username/repository-name.git

cd repository-name

After navigating to the folder with the downloaded files, you need to run the installation script. It is usually called install.sh or dkms-install.shThe script will automatically copy the files to the required directories, register the module in DKMS, and build it for the current kernel. Closely monitor the terminal output for errors.

What to do if git is not installed?

If you don't have Git installed on your system, you can download the source code archive directly from your browser in ZIP or TAR.GZ format. Unzip the archive and run commands within the created folder, skipping the cloning steps.

It's important to disable Secure Boot in the BIOS/UEFI before installing third-party modules. If this feature is enabled, the kernel will refuse to load drivers that aren't digitally signed by Microsoft, and you'll be left without Wi-Fi again. Disable Secure Boot, save your settings, and reboot.

Driver specifics for different manufacturers

Different network equipment manufacturers use different approaches to Linux support. Understanding these differences helps you find a solution faster. Below is a table describing the specifics of working with the most common vendors in an Ubuntu environment.

Manufacturer Support status Common problems Recommended method
Intel Excellent (in the core) Rare firmware errors Updating Linux Firmware
Realtek Needs attention Instability, breaks DKMS from GitHub
Broadcom Good (proprietary) Module conflicts Add. Ubuntu drivers
MediaTek Average Absent in older kernels Building from source

For cards Intel Problems are rare, as the drivers are built directly into the Linux kernel. If Wi-Fi isn't working, it's most often due to missing microcode files included in the package. linux-firmwareUpdating this package via apt usually solves the problem.

Devices Broadcom often require a proprietary package bcmwl-kernel-source. It is important to ensure that conflicting open drivers (eg. bcma or b43) are blocked in the configuration file modprobe.d, otherwise they can intercept the device and prevent the correct driver from working.

Diagnostics and troubleshooting

Even after successfully installing the driver, Wi-Fi may not appear. In such cases, it is necessary to perform a thorough diagnosis. First, check the status of the network management service. In modern versions of Ubuntu, this is used. NetworkManager, and its status can be checked through systemctl.

systemctl status NetworkManager

If the service is active but there are no networks, try reloading the kernel module manually. Use the command modprobe -r to remove the module and modprobe to reboot it. This often helps "wake up" an adapter that's stuck in an incorrect state.

It is also worth checking whether the wireless network is blocked by the utility. rfkill. Enter the command rfkill list in the terminal. If you see the status Soft blocked: yes, unlock the network with the command rfkill unblock wifi. If the status Hard blocked: yes, then the problem is physical - look for the switch on the laptop case.

  • 📡 Team iwconfig will show the status of wireless interfaces.
  • 📄 Logs /var/log/syslog contain detailed information about driver errors.
  • 🔌 Reconnecting the device helps reset the state of USB adapters.

⚠️ Note: Interfaces and package names may vary slightly between Ubuntu versions (20.04, 22.04, 24.04). Always check the package names in the official documentation for your distribution.

Is it safe to install drivers from third-party PPA repositories?

Using a PPA (Personal Package Archive) may be necessary to obtain the latest driver versions, but it is always a risk. Repositories from reputable developers (like lwfinger) are generally safe. However, keep in mind that PPAs don't undergo the same rigorous testing as official Ubuntu packages and may cause system instability when updating the kernel.

What should I do if Wi-Fi disappears after a kernel update?

This is a typical situation for drivers installed via DKMS. DKMS usually automatically rebuilds the module for the new kernel. If this doesn't happen, check the DKMS logs in /var/lib/dkms/You may need to reinstall the header package. linux-headers for the new kernel version and run sudo dkms autoinstall.

Can I use Windows drivers in Ubuntu?

Technically there is a tool ndiswrapper, which allows you to run Windows drivers (.sys files) in Linux. However, in today's environment, this is highly discouraged. This method is unstable, slow, and often causes the system to crash. It's better to find a native Linux driver or use a USB Wi-Fi adapter with Linux support.