How to Set Up Wi-Fi on Ubuntu: From Drivers to a Stable Connection

The Linux operating system, in particular the distribution UbuntuWhile Windows is becoming more user-friendly every year, wireless connection issues can still be a challenge for beginners. Often, after installing the system on a laptop or desktop computer, users discover that the Wi-Fi icon is missing, and network searches fail. This is because not all wireless adapter manufacturers provide open-source drivers that are integrated into the kernel by default.

In this article, we'll cover in detail how to diagnose a lost connection, find and install the necessary proprietary drivers, and manage connections through the graphical interface and terminal. You'll learn why Wi-Fi might not work after a kernel update and which commands can help restore network functionality in minutes without reinstalling the system.

We'll cover a variety of scenarios, from standard home router setups to complex cases involving Broadcom or Realtek adapters that require manual intervention. Understanding how network managers work in Linux will give you confidence in any situation where your wireless connection stops functioning properly.

Hardware diagnostics and driver testing

Before you begin any active configuration steps, you need to determine whether the system can see your wireless equipment. Linux has powerful diagnostic tools, which are often overlooked by users accustomed to graphical interfaces. The first step should always be to verify the physical presence of the device and its status in the system.

Open the terminal and enter the command lspci | grep -i network for table cards or lsusb For USB adapters. If you see the name of your adapter in the output, for example, Intel Corporation Wireless-AC or Realtek Semiconductor, which means the hardware is physically functional and is detected by the motherboard. A device's absence from the list may indicate a hardware failure or a BIOS disablement.

Next, you should check whether the corresponding kernel module is loaded. The command lshw -C network will show detailed information about network interfaces. Pay attention to the line configuration: if it is indicated there driver= it doesn't matter or it's worth it driver=unclaimed, which means the driver is missing. This is the most common reason for Wi-Fi not working in new Ubuntu installations.

⚠️ Attention: If you've just updated your system kernel, old drivers may no longer work. In this case, rebooting or reinstalling kernel header packages via sudo apt install linux-headers-generic.

For laptop users, it's important to check the physical Wi-Fi switch or key combination (usually Fn + F-key with the antenna). In Linux, the status of this switch is displayed with the command rfkill listIf you see the status Soft blocked: yes, this means that the blocking is software-based and can be removed with the command sudo rfkill unblock wifi. Status Hard blocked: yes speaks of physical shutdown.

📊 What Wi-Fi adapter do you have?
Intel
Realtek
Broadcom
Atheros
Don't know

Installing proprietary drivers via GUI

In most cases, Ubuntu can automatically find and offer to install the necessary drivers through a graphical interface. This is the simplest and safest method, recommended for novice users who don't want to risk system stability by entering complex commands.

To access this tool, open the application menu and find the Additional Drivers utility (Software & Updates -> Additional Drivers). The system will scan your hardware and offer a list of available drivers. You need to select the item marked proprietary (proprietary) or tested (tested), and then click the "Apply Changes" button.

  • 📡 Intel: Drivers are usually built into the kernel, but newer models may require firmware updates.
  • 💻 Broadcom: Often requires a package bcmwl-kernel-source, which is installed through this interface.
  • 🔌 Realtek: The situation varies; some models work out of the box, while others require manual compilation.

The installation process may take a few minutes while the system downloads packages from the repositories and compiles modules for the current kernel. A reboot is required after completion. If Wi-Fi doesn't appear after a reboot, try selecting a different driver option in the same window, if one is available.

Setting up a connection via NetworkManager

After the drivers are successfully installed, wireless network management is handled by the network manager. In standard Ubuntu, it is used NetworkManager, which provides a convenient graphical interface in the upper right corner of the screen. However, fine-tuning may require using the command line or a connection editor.

To connect to the network, click the network icon, select your SSID (network name), and enter the password. If the connection is established but constantly drops, the issue may be with power saving settings or an IP address conflict. In such cases, editing the connection settings via the Network Settings menu -> Wi-Fi -> Gear icon can help.

An important parameter is the IPv4 method. For home routers, it is usually worth leaving the value Automatic (DHCP)However, if your router isn't distributing addresses correctly, you can set a static IP address. It's also worth paying attention to the "Privacy" tab: using a random MAC address can cause problems on routers with MAC filtering.

Parameter Recommended value Description
IPv4 Method Automatic (DHCP) Automatically obtain an IP from the router
Privacy Use default MAC address Use real MAC (for filtering)
MTU Automatic The package size usually does not need to be changed.
Power Saving On / Off Energy saving (may cause breaks)

If the GUI freezes or does not display networks, you can use the utility nmcli (NetworkManager command line interface). Team nmcli dev wifi list will show available networks, and nmcli dev wifi connect "SSID" password "password" will establish a connection. This is a reliable way to diagnose errors hidden in the GUI.

☑️ Checking your Wi-Fi connection

Completed: 0 / 5

Solving problems with Broadcom and Realtek adapters

Adapters from companies Broadcom And Realtek have historically caused the most trouble for Linux users due to the closed source nature of their code. For Broadcom, the situation is resolved relatively simply by installing a package. bcmwl-kernel-sourceMake sure you have an internet connection (at least temporarily via your phone) and run the command in the terminal.

sudo apt update

sudo apt install bcmwl-kernel-source

sudo modprobe -r b43 ssb wl

sudo modprobe wl

With adapters Realtek The situation is more complicated, especially with the RTL88xx series models. Drivers for them are often missing from the standard Ubuntu repositories. In this case, the only viable option is to search for the driver on GitHub and compile it. You'll need the following packages: git, build-essential and kernel headers.

⚠️ Attention: When compiling drivers from source, remember that after each Linux kernel update you will have to recompile the module, otherwise Wi-Fi will stop working.

The installation process typically looks like this: cloning the driver repository, navigating to the folder, and running the installation script. For example, for popular whistles, the repository rtl8812auAfter installation, you need to perform sudo modprobe with the name of the new module. Make sure you download the driver that matches your specific chip model.

Where can I find the exact chip model?

You can find the exact chip model using the lsusb command in the terminal. Look for a line with an ID, such as 0bda:8812. Using these numbers, you can find the required driver on GitHub or in the Linux Wireless database.

Setting up Wi-Fi via terminal (iwconfig and netplan)

For server versions of Ubuntu or situations where the graphical shell doesn't work, you need to know the basics of network configuration via the terminal. Modern versions of Ubuntu (starting with 17.10) use the network configurator. Netplan, which manages the NetworkManager or systemd-networkd backend.

Netplan configuration files are located in the directory /etc/netplan/ and have an extension .yamlPlease be extremely careful when editing: indentation in YAML is critical. To configure a static IP or DNS over Wi-Fi, you will need to create or edit the appropriate file.

network:

version: 2

wifis:

wlan0:

dhcp4: true

access-points:

"MyHomeWiFi":

password: "SecretPassword"

After making changes, the configuration must be applied using the command sudo netplan applyIf you are using the old method with iwconfig (wireless-tools interfaces), remember that it is considered deprecated, but still works for quick diagnostics. The command iwconfig will show the current status of the wireless interface, signal level and frequency.

  • 🔍 iwlist scanning: Allows you to see a detailed list of networks with signal levels.
  • 🔑 wpa_passphrase: Utility for generating a hashed password for wpa_supplicant configs.
  • 🛠 ip addr: A modern replacement for ifconfig for viewing interface IP addresses.

Usage wpa_supplicant remains relevant for minimalist builds. This is the daemon that handles WPA encryption. Its configuration file /etc/wpa_supplicant/wpa_supplicant.conf Contains lists of trusted networks. The daemon is controlled by systemd.

Optimization and troubleshooting

Even with a successfully installed system, intermittent connection drops or slow speeds may occur. One of the most common causes is Linux's aggressive power saving policy, which disables the Wi-Fi module to conserve power. This can be disabled by creating a configuration file for the kernel module.

Create a file /etc/Module/ath9k.conf (the name depends on your driver, for example, iwlwifi for Intel) and add the line options ath9k ps=0This will prevent the module from going into sleep mode. For Intel drivers, the parameter may be called power_save=0A reboot is required after changes.

⚠️ Attention: Interfaces and package names may change in new versions of Ubuntu. Always consult the official documentation if standard commands don't work.

It's also worth checking your Wi-Fi channels. If you live in an apartment building, the airwaves may be clogged by neighboring routers. Use this utility sudo iwlist wlan0 scanning | grep Frequency or a graphics program Wifi Analyzerto find the least crowded channel and switch your router to it. Overlapping channels 1, 6, and 11 in the 2.4 GHz band is a common cause of low speeds.

Another issue may be a conflict with the IPv6 protocol. If your ISP doesn't support IPv6, the system's attempts to use this protocol may cause connection delays. NetworkManager settings allow you to explicitly specify IPv4-only use, which often resolves the issue of slow internet.

Why doesn't Ubuntu see my Wi-Fi adapter after installation?

Most likely, your system is missing proprietary drivers for your hardware. Connect your phone via USB (modem mode) or an Ethernet cable, then run "Additional Drivers" to search for and install the missing software.

How do I know which driver is currently being used?

Use the command lshw -C network or lsmod | grep wifiIn conclusion lshw Look for the "configuration" field, it will contain driver=driver_name.

Is it possible to share Wi-Fi from an Ubuntu laptop?

Yes, it's possible. In modern versions of Ubuntu (20.04 and newer), there's a "Hotspot" tab in the network settings that allows you to turn your laptop into a router if the adapter supports this feature.

My Wi-Fi is slow, even though my router is powerful. What should I do?

Check to see if the adapter is operating in 2.4 GHz mode instead of 5 GHz. Also try disabling power saving and changing the channel on your router. Make sure the driver is not generic, but tailored to your model.

Do I need to reinstall drivers after updating Ubuntu?

Typically, no, if you installed drivers from the official Ubuntu repositories (via apt). If you compiled the driver manually from source, you'll have to repeat the process after updating the kernel.