How to Connect to WiFi on Ubuntu: A Complete Guide

Installing a Linux operating system is often the first step to improving your computer's performance and security, but the lack of a wired connection can create a vicious circle. Beginners often encounter a situation where, after installing the distribution, Ubuntu The system doesn't offer to select a wireless network, leaving the user without internet access. This occurs due to the lack of proprietary drivers or specific kernel settings that must be activated manually.

Modern versions of the distribution, such as Ubuntu 22.04 LTS or 24.04, have excellent hardware support out of the box, but exceptions are common. In this guide, we'll cover all possible scenarios: from a standard connection via the graphical interface to in-depth configuration via the command line. You'll learn how to diagnose adapter issues and force the necessary services to start.

It is important to understand that connection methods may vary depending on the graphical environment used, whether it is a standard GNOME, KDE Plasma or XfceDespite the external differences, the fundamental principles of a network manager's work remain consistent across the entire ecosystem. We'll focus on the most relevant and effective methods that guarantee results.

Checking for the presence of a wireless adapter

The first step before taking any active action should be a hardware diagnostic. It's common for the physical switch on the laptop case to be in the "Off" position, or for the wireless module to be disabled via a function key combination. In Linux, this condition is displayed as a "Hard Block," which is more difficult to bypass using software than bypassing it using software.

To obtain detailed information about your devices, you need to use the terminal. Open it using the keyboard shortcut. Ctrl+Alt+T and enter the command lspci | grep -i network for internal cards or lsusb for USB dongles. If you see the name of your chipset in the output, for example, Realtek or Intel, this means the system sees the device, but perhaps does not know how to work with it.

The utility will provide more detailed information about the status of locks. rfkill. Running the command rfkill list all will show the status of all wireless interfaces. If you see the line "Hard blocked: yes," no software methods will help until you flip the physical switch or press Fn+F2 (or another combination) on the keyboard.

⚠️ Note: If the adapter is not displayed in any lspci, not in lsusbIt may be physically faulty or disabled in the BIOS/UEFI. Check the power saving settings in the Basic Input/Output System.

In some cases, a forced restart of the network service is required, even if the adapter is detected by the system. This helps clear a driver freeze that may have occurred after resuming from sleep mode.

sudo systemctl restart NetworkManager

After completing these steps, it's worth rechecking the connection status. If the adapter is detected and not blocked by hardware, you can proceed to configuring the connection.

Connecting via the GNOME graphical interface

Standard shell GNOMEThe default Wi-Fi connection in Ubuntu offers an intuitive mechanism for connecting to Wi-Fi. In the upper right corner of the screen is the system tray, which displays the sound, battery, and network indicators. Clicking the network icon (usually represented by two triangles or an airplane with a line through it) opens a drop-down menu.

If the wireless module is active, you will see a list of available access points. Select your network from the list and click "Connect." The system will prompt you for a password, which must be entered exactly, taking care to ensure proper case-insensitive operation. For encrypted networks WPA2/WPA3 This is critically important.

  • 📡 Make sure the Wi-Fi slider is set to the "On" position.
  • 🔒 For corporate networks, additional certificate configuration may be required.
  • ⚙️ By clicking the gear next to the network, you can set up a static IP address.

Sometimes automatic connection fails due to IPv6 setting conflicts. In the connection properties, you can temporarily switch the IPv6 method to "Ignore," which often resolves the issue of endless address acquisition.

📊 Which connection method do you prefer?
Graphical interface (GUI): Terminal (CLI): Automated script: I don't use Ubuntu

If the desired network isn't listed, it may be hidden. To connect to such a network, select "Connect to a hidden network" in the Wi-Fi menu and manually enter the SSID (network name) and security settings.

Setting up Wi-Fi via the terminal (nmcli)

For experienced users or server versions of Ubuntu, where there is no graphical interface, the utility becomes an indispensable tool nmcli (Network Manager Command Line Interface). It allows you to manage all aspects of network connections without leaving the command line.

Before you begin, make sure the network manager is active. Command nmcli radio wifi will show the current status. If it is disabled, enable it with the command nmcli radio wifi onNext, you need to scan available networks.

nmcli dev wifi list

After scanning, you'll receive a list of networks with their SSID, signal strength, and security. To connect, use the command, substituting your network name and password. Note: If the network name contains spaces, it must be enclosed in quotation marks.

nmcli dev wifi connect "Network_Name" password "Your_Password"

If the connection is successful, the system will create a connection profile that will be used automatically when the network comes back into range. This is especially convenient for laptops traveling between home and the office.

⚠️ Note: When entering your password in the terminal, characters are not displayed (no asterisks). This is standard Linux security behavior. Type your password blindly and press Enter.

To delete a saved profile, for example if you changed the router password, use the command nmcli connection delete "Network_Name"After this, you can reconnect with the new data.

Troubleshooting Broadcom and Realtek Drivers

The most common reason for the lack of Wi-Fi in Ubuntu is chipsets from the company Broadcom, which require proprietary drivers. Luckily, there's a package in the Ubuntu repositories. bcmwl-kernel-source, which solves this problem, but you need the Internet to install it.

If an Ethernet cable isn't available, you can use a USB modem from your phone (USB tethering mode) or download the driver's DEB package from another computer and transfer it via a flash drive. After connecting to the internet via cable or phone, open "Programs and Updates" and go to the "Additional Drivers" tab.

The system will search and offer to install the recommended driver. Select it and click "Apply Changes." After rebooting, the wireless module should work. Realtek Sometimes it is necessary to build a module from source code if the standard driver rtl8821ce-dkms doesn't work.

BCM43xx
Manufacturer Chipset type Required package Support status
Intel Central processors firmware-iwlwifi Built into the kernel
Broadcom bcmwl-kernel-source Proprietary
Realtek RTL8821CE rtl8821ce-dkms Requires compilation
Atheros AR9xxx firmware-atheros Open source driver

If Wi-Fi disappeared after a system update, check the module installation logs.

What to do if the driver is not installed?

If the package installation fails, try removing old driver versions with sudo apt purge bcmwl-kernel-source, then update the package lists with sudo apt update and try the installation again. Disabling Secure Boot in the BIOS can sometimes help.

Using Wicd on Old Computers

On slower machines or specific Linux distributions, the standard NetworkManager can consume too many resources or become unstable. In such cases, a lightweight connection manager is an excellent alternative. WicdIt completely replaces the standard tool and often performs better with older equipment.

To install Wicd, you must first remove or disable the default NetworkManager, as they conflict with each other for interface management. Installation is performed via the terminal: sudo apt install wicd wicd-gtkAfter installation, the program will appear in the applications menu.

  • 🚀 Consumes significantly less RAM.
  • 🔧 Has a simple interface for setting up static IP and DNS.
  • 📜 Maintains a detailed connection log, convenient for diagnostics.

Wicd's interface is minimalist: a list of networks on the left, and properties on the right. Simply select a network, click "Connect," and enter the password. The program will automatically detect the encryption type.

☑️ Diagnosing Wi-Fi problems

Completed: 0 / 1

Common mistakes and how to fix them

Even with proper configuration, issues can still occur. One common issue is interface name changes. In modern versions of Ubuntu, interfaces may be named differently. wlan0, and, for example, wlp2s0This is normal behavior, but older scripts may not work.

Another common error is related to the incorrect time. If the system time is out of sync, security protocols (especially WPA2-Enterprise) may block the connection. Synchronize the time via timedatectl or date settings.

If you have a connection but the internet isn't working, check your DNS settings. Try entering Google's public DNS servers (8.8.8.8) or Cloudflare (1.1.1.1) in the IPv4 settings of your connection.

sudo nano /etc/resolv.conf

You can add the following line to this file: nameserver 8.8.8.8However, keep in mind that in Ubuntu this file is often managed automatically, so it is better to change the DNS through the graphical interface or nmcli.

FAQ: Frequently Asked Questions

Why can't Ubuntu see my Wi-Fi adapter?

Most likely, proprietary drivers are missing. Check the "Additional Drivers" tab in the system settings. Also, make sure the adapter isn't blocked by the command rfkill list.

How to connect Wi-Fi without a graphical interface?

Use the utility nmcli. Team nmcli dev wifi connect "SSID" password "PASS" will allow you to connect to the network directly from the terminal.

Where are Wi-Fi passwords stored in Ubuntu?

Passwords are stored encrypted in the keyring. Connection configuration files are located in the directory /etc/NetworkManager/system-connections/, but the passwords are hidden there.

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

Yes, there's a "Hotspot" feature in your network settings. It allows you to share your wired internet or other Wi-Fi connections with your mobile devices.