Wifi Driver for Linux Ubuntu: Install, Configure, Troubleshoot
In this article
Yes, you can install and configure Wi‑Fi drivers on Ubuntu; the following guide shows how to identify your hardware, install the appropriate driver, and verify connectivity.
What You’ll Need
- Ubuntu 20.04 or newer with sudo access
- Active Ethernet or mobile hotspot to download packages
- Terminal (Ctrl+Alt+T)
- Optional: a USB Wi‑Fi adapter if you prefer a backup
Step-by-Step
- Open a terminal. Identify your wireless device with
lspci -nn | grep -i networkorlsusb. Note the vendor and device ID. - Update the package lists:
sudo apt update. - Check if a driver is already loaded:
lsmod | grep -i <module>. For Intel cards look for iwlwifi, for Broadcom for bcmwl, for Realtek for rtlwifi. - Install the generic firmware package:
sudo apt install linux-firmware. This pulls the most common firmware blobs. - Depending on the hardware, install the specific driver:
- Intel:
sudo apt install firmware-iwlwifi. - Broadcom:
sudo apt install bcmwl-kernel-source. - Realtek (rtl8188/8192/8192E/8812/8814):
sudo apt install rtlwifi-neworsudo apt install firmware-realtek. - Other vendors: use
sudo ubuntu-drivers devicesto list available proprietary drivers andsudo ubuntu-drivers autoinstallto install them.
- Intel:
- Load the module manually:
sudo modprobe <module>. Replace <module> with iwlwifi, bcmwl, rtlwifi, etc. - Verify the interface appears:
ip link showoriw dev. The interface should be called wlan0 or similar. - Use the network manager GUI or
nmclito connect to your Wi‑Fi network. Example:nmcli dev wifi connect <SSID> password <PASSWORD>. - Restart NetworkManager to ensure changes take effect:
sudo systemctl restart NetworkManager. - Confirm connectivity:
ping -c 4 google.com.
Common Mistakes
- Assuming the driver is already installed; many Intel cards need the firmware package.
- Installing a driver that conflicts with an existing module, such as both bcmwl and b43 for Broadcom cards.
- Leaving Secure Boot enabled when the kernel module is unsigned; the kernel will refuse to load it.
- Forgetting to reboot after installing a new driver; the kernel must load the module on boot.
- Using the wrong vendor ID; double-check the output of
lspciorlsusb.
Tips
- Run
sudo ubuntu-drivers autoinstallto let Ubuntu automatically pick the best proprietary driver for your hardware. - Check the status of the wireless interface with
rfkill list; if it shows "blocked", runsudo rfkill unblock all. - Use
lshw -C networkto view detailed hardware info and confirm the driver name. - If you have a dual‑boot system, disable Secure Boot in the UEFI settings before installing unsigned modules.
- Keep the system updated; newer kernels often include improved driver support.
Troubleshooting
If the Wi‑Fi does not appear after following the steps, try the following in order:
- Check
dmesgfor firmware load errors:dmesg | grep -i firmware. - Verify the module is loaded:
lsmod | grep -i <module>. If not, trysudo modprobe <module>again. - Look for blocked devices:
rfkill list. Unblock withsudo rfkill unblock all. - Confirm Secure Boot is disabled; if it is enabled, the kernel may refuse unsigned modules.
- Try installing an older kernel from the "Other Versions" tab in the "Software & Updates" > "Updates" section.
- If you installed a proprietary driver, remove it with
sudo apt purge bcmwl-kernel-sourceand reinstall the open source alternative. - Check NetworkManager logs:
sudo journalctl -u NetworkManager | tail -n 50. - As a last resort, reinstall the entire networking stack:
sudo apt install --reinstall network-manager wireless-tools.
Frequently Asked Questions
How do I know which driver my Wi‑Fi card needs?
Run lspci -nn | grep -i network or lsusb. The vendor ID tells you the manufacturer; cross‑reference it with the Ubuntu Hardware Drivers page or the linux‑firmware repository to find the correct package.
My Wi‑Fi works on another OS but not Ubuntu – why?
Ubuntu may not ship the firmware blob for that device by default. Installing the appropriate firmware package or proprietary driver usually resolves the issue.
Can I use the same driver on older Ubuntu releases?
Most drivers are backported, but compatibility depends on the kernel version. For Ubuntu 18.04 you may need to use older packages or enable the "Proposed" repository.
How do I disable Secure Boot to load unsigned drivers?
Reboot, enter the UEFI setup (usually F2, F10, or DEL), navigate to the Secure Boot option, and set it to Disabled. Save and exit; the system will reboot with Secure Boot off.
What if my Wi‑Fi is still not working after installing firmware?
Check that the module is loaded and not blocked by rfkill. Inspect dmesg for firmware errors and ensure you are using a kernel that supports your hardware.