How to Connect Wi-Fi on Ubuntu: A Step-by-Step Guide

Transition to an operating system Linux is often accompanied by a desire for a clean, fast, and secure working environment. However, the first obstacle the user faces after installation is the lack of an internet connection, which is necessary for updating packages and installing proprietary drivers. Unlike Windows, where drivers are often built into the distribution or downloaded automatically, Ubuntu This process may require manual intervention, especially on newer laptops or specific network adapters.

Modern versions of the distribution, such as 22.04 LTS or 24.04, have significantly improved wireless module support, but configuration nuances still exist. Proper setup wireless interface Guarantees not only network access but also stable data transfer speeds and the correct operation of power-saving modes. In this article, we'll cover all connection steps, from the graphical interface to advanced terminal methods.

If you've just installed the system and discovered that the network icon is missing or shows Wi-Fi turned off, don't panic. In most cases, the problem can be resolved in a few minutes with the right steps in system settings or the command line. The key is to understand which network management method is active in your OS version and how to interact with it. NetworkManager.

Checking for the presence of a wireless adapter

Before attempting any complex manipulations, you need to ensure that the operating system physically recognizes your network device. It often happens that the driver is missing, and the system can't even identify the card model. For initial diagnostics, it's best to use a terminal, as it provides the most complete and accurate information about the hardware status.

Open Terminal using a keyboard shortcut Ctrl+Alt+T and enter the command lspci for built-in maps or lsusb For external USB adapters. These utilities will list all connected devices. You need to look for lines containing the words "Wireless," "WiFi," "802.11," or manufacturer names like Broadcom, Intel, or Realtek. If the device appears here, it means the hardware is working properly, and the issue is only with the software.

⚠️ Warning: If your device is labeled as "Network controller" without specifying the model or with the code "Unknown device" in the output of the lspci or lsusb commands, this is a sure sign that the driver is missing.

For more detailed information about network interfaces, use the utility ip link or nmcli device. Team nmcli This is part of the network manager and will show not only the presence of the device but also its current status (connected, disconnected, unavailable). If the adapter is shown as "unmanaged," it means the system sees the card but doesn't manage it, which often happens when there are network service conflicts.

Why might the adapter not be detected?

The adapter may not be detected due to a disconnected PCIe bus power supply, a hardware lock via the FN keys, or a critical kernel error. Sometimes, a static discharge can help: turn off the laptop, unplug the power, hold down the power button for 15 seconds, and then turn it back on.

Configuration via the GNOME graphical interface

The default GNOME desktop environment in Ubuntu makes network management as easy as possible. Most modern routers and access points are automatically detected, requiring only a password. This is the primary method to try first, as it doesn't require knowledge of command syntax.

To get started, click the network icon in the upper right corner of the screen (usually two arrows or a Wi-Fi icon). In the drop-down menu, make sure the Wi-Fi switch is enabled. If the network list is empty but the adapter is detected by the system, you may need to manually enable the wireless module or check that Airplane Mode is not enabled.

When you select your network, a dialog box will open asking you to enter a security key. It's important to select the correct encryption type, although the system usually selects one automatically. WPA3 or WPA2If the connection is successful, a lock icon and signal strength indicator will appear next to the network name. You can also set "Automatic connection" in the settings to have the system automatically connect to the network when it's detected.

📊 Which interface do you prefer for network configuration?
Graphical (GNOME/KDE)
Terminal (nmcli/Netplan)
Console (nmtui)
I don't need to configure it, everything works by itself.

In the advanced settings, accessible via the "Settings" -> "Wi-Fi" menu, you can configure a static IP address, DNS servers, and proxies. This is especially relevant for corporate networks or providers that require specific configurations. Be sure to check the "Identity" tab if your network requires certificate or login authentication (PEAP).

Using the Terminal: nmcli Utility

For system administrators or users working with server versions of Ubuntu without a graphical shell, an indispensable tool is nmcli (NetworkManager Command Line Interface). This utility allows you to perform all the same actions as the graphical interface, but with greater flexibility and automation.

The first step is always to scan for available networks. The command nmcli device wifi list will display a table with available access points, their frequency, signal strength, and security type. If the list is empty, try rescanning with the flag --rescan yesThis often helps if the network is hidden or the adapter is "asleep".

To connect to a network, use the connect command. The syntax requires the SSID (network name) and password. If the network name contains spaces, it must be enclosed in quotation marks. After the command is successfully executed, the system will create a connection profile and attempt to obtain an IP address via DHCP.

nmcli device wifi connect"MyHomeNetwork" password"SuperSecretPassword123"

In case of connection errors, nmcli usually returns a clear error code. For example, the error "secret-agent-not-available" could indicate problems storing keys in GNOME Keyring, while "network-unreachable" could indicate a weak signal or an incorrect password. To view all saved profiles, use the command nmcli connection show, and to remove unnecessary things - nmcli connection delete"Profile_Name".

Installing proprietary drivers

One of the most common reasons for Wi-Fi not working in Ubuntu is the lack of proprietary drivers, especially for Broadcom cards and some Realtek models. Open source drivers (open-source) support a wide range of devices, but for maximum performance and stability, closed source binaries are often required.

Ubuntu has a convenient mechanism for searching and installing such drivers. Go to the "Software & Updates" app and open the "Additional Drivers" tab. The system will scan your hardware and, if it finds suitable drivers in the repositories, offer to install them. Simply select the desired option and click "Apply Changes."

If the graphical tool doesn't help or you have a server version, you can use the terminal. Utility ubuntu-drivers will automatically select recommended packages. Before running, make sure you have internet access (at least via an Ethernet cable or USB modem), as packages will be downloaded from repositories.

sudo ubuntu-drivers autoinstall

After installing the drivers, especially for Broadcom (packages bcmwl-kernel-source), a reboot or at least a kernel module reload is often required. Without this step, the new library will not be loaded into memory, and the device will remain inoperable. It's also worth checking the module status with the command lsmod | grep wl or lsmod | grep brcm.

☑️ Installing drivers

Completed: 0 / 4

Solving common problems

Even with the correct drivers, users may experience unstable connections, constant disconnects, or an inability to obtain an IP address. Often, the problem stems from conflicting network management services or aggressive power-saving settings that disable the adapter to conserve battery life.

One of the common problems is the conflict between services NetworkManager And netplan (or systemd-networkd). In desktop versions of Ubuntu, the NetworkManager service should be the dominant one. You can verify this by checking the contents of the configuration file. /etc/netplan/01-network-manager-all.yaml, where the renderer should be specified as NetworkManager.

⚠️ Note: Interfaces and configuration file names may vary depending on the Ubuntu version. Always check the latest documentation for your release, as newer versions (24.04+) implement Netplan with the NetworkManager backend by default.

Another common cause of crashes is power saving mode. Linux can automatically disable the Wi-Fi module if it detects it's not being actively used, leading to lag and disconnects. You can disable this behavior by creating or editing a configuration file. /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf and setting the value wifi.powersave V 2 (which means turning off savings).

Below is a table of nmcli Wi-Fi status codes and their meanings to help you diagnose the problem faster:

Status Description Action
disconnected The device is ready but not connected Run connect
connecting The process of authorization and obtaining IP Wait or check password
connected Successful connection to the network No action
failed Connection error Check logs (journalctl)
unavailable The driver is not loaded or the device is blocked Check rflist and drivers

Frequently Asked Questions (FAQ)

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

Most likely, your network card is missing drivers in the standard Linux kernel. This often happens with newer laptop models or specific USB dongles. You'll need a temporary connection via an Ethernet cable or USB modem (Android/iOS) so the system can download the missing packages via "Additional Drivers" or the command apt install.

How to enable Wi-Fi if it is blocked by hardware?

If the team rfkill list If the device shows the "hard blocked" status, you can't enable Wi-Fi programmatically. You'll need to find the physical switch on the laptop or use a key combination (usually Fn + the antenna key). After the hardware block is removed, the status will change to "soft blocked" or "unblocked," and you can activate the module programmatically.

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

Yes, modern versions of Ubuntu support hotspot mode directly from the Wi-Fi settings graphical interface. In the terminal, you can do this using nmcli, creating a new "wifi-hotspot" connection. However, for the access point to function, the wireless card driver must support the corresponding master station mode.

What to do if Wi-Fi is slow?

Check whether the adapter has switched to B/G mode instead of N/AC/AX. You can do this in the connection settings by selecting the preferred standard. It's also worth disabling IPv6 if your provider doesn't use it, and changing your DNS servers to faster ones (for example, Google or Cloudflare). Disabling power management can sometimes help.

Where can I find connection error logs?

The main event log in Ubuntu is maintained by systemd. To view network-related errors, use the command journalctl -u NetworkManager -f in real time or journalctl -u NetworkManager --since"10 min ago" To analyze recent events, this will help identify the reason for authorization or IP address denials.