Wifi Guide

How to Install Wifi in Ubuntu? Fix and Enable Wireless Connection

Introduction If you have recently installed Ubuntu on your laptop or desktop, you might notice that wireless connectivity is not working out of the box. Many users search for How to Install Wifi in Ubuntu? because the answer depends on your hardware, driver su

HowToFixWiFi

Introduction

If you have recently installed Ubuntu on your laptop or desktop, you might notice that wireless connectivity is not working out of the box. Many users search for How to Install Wifi in Ubuntu? because the answer depends on your hardware, driver support, and whether the wireless adapter is enabled at the system level. Unlike Windows, Ubuntu relies on open-source drivers and firmware, which means some proprietary wireless cards require additional steps before they can connect to a network.

This comprehensive guide walks you through everything from checking hardware compatibility to installing drivers, enabling WiFi, fixing common issues, and connecting through both graphical and command-line tools. By the end, you will know exactly how to get your wireless connection working reliably on Ubuntu, whether you are using the latest release or an older LTS version.

Table of Contents

Understanding WiFi on Ubuntu

Ubuntu ships with a powerful networking stack built around NetworkManager and the Linux kernel’s wireless subsystem. Most modern Intel, Atheros, and MediaTek adapters work automatically because their drivers are included in the kernel. However, some Broadcom and Realtek chips rely on proprietary firmware that cannot be distributed by default due to licensing restrictions. This is why many tutorials focus on How to Install Wifi in Ubuntu? as a driver installation problem rather than a simple toggle.

When WiFi is missing, the issue usually falls into one of three categories: missing firmware, a disabled radio, or a driver that failed to load. Understanding which category applies to your system saves time and prevents unnecessary reinstalls.

Check Your Hardware and WiFi Status

Before installing anything, verify that Ubuntu can see your wireless device. Open a terminal and run a few diagnostic commands. These checks help you determine whether the adapter is detected but unclaimed, or completely invisible to the system.

lspci | grep -i network
lsusb | grep -i wireless
ip link show
rfkill list all

The rfkill command is especially useful. If it shows “Soft blocked: yes,” you can usually fix it with a single command. If it shows “Hard blocked: yes,” check your laptop’s physical WiFi switch or function key combination.

To unblock WiFi, run:

sudo rfkill unblock wifi
sudo rfkill unblock all
code>

If the device appears in lspci but has no driver attached, you likely need to install firmware or a proprietary driver.

Identify Your Wireless Adapter

Knowing the exact chipset makes driver installation straightforward. Use these commands to gather details:

lspci -nnk | grep -A3 -i network
sudo lshw -C network
code>

Look for lines mentioning "Wireless," "WiFi," or a vendor name such as Intel, Broadcom, or Realtek. Once identified, you can search for the specific Ubuntu package that provides support. For example, Broadcom BCM43142 cards often need the bcmwl-kernel-source package, while many Realtek chips need rtl8821ce-dkms.

Install WiFi Drivers on Ubuntu

Driver installation is the core of solving How to Install Wifi in Ubuntu? for most users. Start by updating your package list and upgrading existing packages so dependencies are current.

sudo apt update
sudo apt upgrade -y
code>

Then install common firmware packages that cover a wide range of adapters:

sudo apt install linux-firmware
sudo apt install firmware-b43-installer b43-fwcutter
code>

For Intel adapters, firmware is usually already present. For Broadcom, you may need:

sudo apt install bcmwl-kernel-source
code>

After installation, reboot your system so the kernel can load the new module:

sudo reboot
code>

If the module does not load automatically, you can manually insert it. For example, with the wl driver:

sudo modprobe wl
code>

Using Additional Drivers for Proprietary Hardware

Ubuntu includes a graphical tool called "Additional Drivers" that simplifies proprietary driver installation. You can open it from the applications menu or launch it via terminal:

software-properties-gtk --open-tab=4
code>

This tool scans your hardware and lists available proprietary drivers. Select the recommended wireless driver, apply changes, and reboot. This method is often the safest for beginners because it avoids manual package hunting.

Enable WiFi via NetworkManager

Once drivers are installed, NetworkManager usually handles connections automatically. You can enable WiFi from the system tray icon in the top panel. If the icon is missing, restart NetworkManager:

sudo systemctl restart NetworkManager
code>

Check whether WiFi is enabled in NetworkManager:

nmcli radio wifi
nmcli device status
code>

If WiFi is disabled, turn it on:

nmcli radio wifi on
code>

You can also list available networks:

nmcli device wifi list
code>

And connect to a network with:

nmcli device wifi connect "YOUR_SSID" password "YOUR_PASSWORD"
code>

This approach is ideal for headless systems or when the graphical interface is unavailable.

Connect to WiFi Using the Terminal

For users who prefer the command line, nmcli provides full control. First, ensure your wireless interface is up:

ip link set wlan0 up
code>

Replace wlan0 with your actual interface name, which you can find using ip link. Then scan for networks:

nmcli dev wifi
code>

Connect using:

nmcli dev wifi connect "NetworkName" password "SecretPassword"
code>

If you need to set a static IP or modify DNS, you can edit the connection profile:

nmcli connection modify "NetworkName" ipv4.dns "8.8.8.8 1.1.1.1"
nmcli connection up "NetworkName"
code>

This method is reliable and scriptable, making it useful for servers and automation.

Fix Common WiFi Problems

Even after installation, WiFi may behave unpredictably. Here are the most common issues and their fixes.

No Wireless Interface Detected

If ip link does not show a wireless interface, the driver may not be loaded. Check kernel messages:

dmesg | grep -i wifi
dmesg | grep -i firmware
code>

Missing firmware files often appear as errors here. Installing linux-firmware or the vendor-specific package usually resolves this.

Frequent Disconnections

Intermittent drops are often caused by aggressive power management. Disable it temporarily:

sudo iwconfig wlan0 power off
code>

To make it permanent, create a NetworkManager dispatcher script or configure the driver module.

Slow WiFi Speeds

Slow speeds can result from regulatory domain restrictions or outdated drivers. Set your regulatory domain:

sudo iw reg set US
code>

Replace US with your country code. Also ensure your router and adapter both support the same WiFi standard and band.

Disable WiFi Power Saving

Power saving can reduce performance and cause latency spikes. To disable it system-wide, edit the NetworkManager configuration:

sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
code>

Change the value to:

wifi.powersave = 2
code>

Then restart NetworkManager. A value of 2 disables power saving, while 3 enables it.

Handle Secure Boot and Kernel Modules

Secure Boot can block unsigned kernel modules, including some WiFi drivers. If your driver installed but does not load, check Secure Boot status:

mokutil --sb-state
code>

If Secure Boot is enabled and your driver fails, you can either disable Secure Boot in BIOS or enroll a Machine Owner Key (MOK) for the module. The Additional Drivers tool often handles MOK enrollment automatically, prompting you to set a password during installation.

Comparison of WiFi Setup Methods

Different users prefer different approaches. The table below compares the most common methods for solving How to Install Wifi in Ubuntu? based on skill level and reliability.

Method Best For Pros Cons
Additional Drivers GUI Beginners Simple, guided, handles Secure Boot Limited to supported hardware
apt package install Intermediate users Precise control, scriptable Requires knowing exact package
nmcli terminal Advanced users Works without GUI, automation friendly Steeper learning curve
Manual DKMS build Unsupported hardware Supports newest chipsets Can break on kernel updates

Tips and Best Practices

  • Always update Ubuntu before installing drivers to avoid dependency conflicts.
  • Use an Ethernet cable or USB tethering from a phone to download packages if WiFi is unavailable.
  • Keep a backup of working driver packages in case a kernel update breaks connectivity.
  • Prefer LTS releases for stable driver support on production machines.
  • Check Ubuntu's certified hardware list before buying a new laptop for Linux.
  • Use journalctl -u NetworkManager to review detailed connection logs.

Frequently Asked Questions

Why is WiFi not showing up after Ubuntu installation?

This usually happens because the required proprietary driver or firmware is missing. Installing linux-firmware or using the Additional Drivers tool typically resolves it.

Can I install WiFi drivers without internet?

Yes. Download the required .deb packages on another device, transfer them via USB, and install with sudo dpkg -i package.deb. You may need to resolve dependencies manually.

Which Ubuntu version has the best WiFi support?

Recent LTS releases such as Ubuntu 22.04 and 24.04 include newer kernels with broader hardware support. If your adapter is very new, the latest LTS is generally recommended.

How do I reinstall a broken WiFi driver?

Remove the existing package with sudo apt remove --purge package-name, update your system, and reinstall. Reboot afterward to ensure the module loads cleanly.

Does Secure Boot affect WiFi on Ubuntu?

Yes. Secure Boot can prevent unsigned proprietary modules from loading. Disabling Secure Boot or enrolling a MOK key solves this issue.

Conclusion

Getting wireless connectivity working on Ubuntu is usually a matter of identifying your adapter, installing the correct driver or firmware, and ensuring the radio is enabled. Whether you use the graphical Additional Drivers tool, apt commands, or terminal utilities like nmcli, the process is straightforward once you know where to look. By following the steps above, you now have a complete answer to How to Install Wifi in Ubuntu? and can troubleshoot most common wireless issues with confidence. Keep your system updated, choose hardware with good Linux support, and your Ubuntu WiFi experience will remain stable and fast.