How to set up WiFi on an Ubuntu laptop: from drivers to the terminal

Installing a Linux operating system often leaves users intimidated by the complexity of setting up basic functions, and connecting to a wireless network is no exception. Unlike Windows, where drivers are often automatically installed or downloaded, Ubuntu The process may require manual intervention, especially if your hardware isn't industry-standard. However, modern versions of the distribution, such as 22.04 LTS or 24.04, have an impressive list of supported devices, making the process extremely simple for most laptop owners.

The main problem faced by beginners is the lack of internet access during system installation, which makes it impossible to automatically download missing firmware. Wi-Fi adapters Modules from Broadcom or Realtek sometimes require the installation of additional packages that physically cannot be loaded without an active connection. Therefore, it's important to know alternative methods for activating the module, including using the command line and manually managing network interfaces.

In this article, we will go through all the steps: from visual configuration via the graphical interface to in-depth diagnostics of problems using the utility. nmcliYou will learn how to identify blocked kernel modules, configure static IP addresses for stable server operation, and understand the logic behind the operation. NetworkManagerEven if you get a black screen instead of a list of networks, the methods below will help restore the connection.

Checking the status of the wireless adapter

Before attempting to enter the router password, you need to make sure the operating system can even "see" your wireless hardware. It's often the case that the module is physically functional, but software-disabled or in a "flying state." In Ubuntu, the network interfaces are managed by the service NetworkManager, which accumulates data on all available connections.

For initial diagnostics, open the terminal using the keyboard shortcut Ctrl+Alt+T, and enter the command ip link showThis utility will display a list of all network interfaces. Look for lines starting with the prefixes wl or iw, For example, wlp2s0If such an interface is present and marked as NO-CARRIER or DOWN, this means the driver is loaded, but the connection is not established.

⚠️ Attention: If the list of interfaces (or any) includes no devices with the "wl" prefix, this could indicate a missing driver or a hardware lock via a button on the laptop case. Check the physical WiFi switch on the end of the device.

It's also worth checking whether the radio broadcast is blocked by software or hardware. For this, use the utility rfkill, which is the standard Linux tool for managing radio modules. Enter the command:

rfkill list all

In the response, you will see a list of devices (Wi-Fi, Bluetooth) and their status. If the WiFi indicator is lit Soft blocked: yes, then the blocking is software. If Hard blocked: yes — hardware. To remove the software lock, simply execute the command sudo rfkill unblock wifi.

Graphical configuration via NetworkManager

For most users, especially those switching from Windows or macOS, the graphical interface will remain the most familiar connection method. In the standard shell GNOME, which is the default in Ubuntu, places network management in the upper-right corner of the screen. Clicking the network icon (usually two triangles or a computer) displays a drop-down menu.

The connection process is intuitive: select your network from the list of available ones (SSID), enter the password, and click "Connect." The system will attempt to obtain an IP address automatically via the protocol. DHCPIf the router is working properly and the password is correct, the connection will be established in a few seconds, and a signal strength icon will appear next to the network name.

📊 Which connection method do you prefer?
Graphical user interface (GUI)
Command line (CLI)
Automatic configuration
WPS button on the router

However, sometimes manual configuration is required, for example, if your router doesn't assign addresses automatically or you're configuring a laptop to work on an office LAN with fixed addresses. To do this, go to Settings → Network (or Settings → Network). Find the WiFi section, click the gear next to your network and go to the tab IPv4.

Here you can switch the method from "Automatic (DHCP)" to "Manual." You'll need to enter the following information, which is usually found on the router's sticker or known to your network administrator:

  • 🌐 Address: your laptop's static IP address (e.g. 192.168.1.50)
  • 🔢 Network mask: usually 255.255.255.0 or prefix /24
  • 🚪 Gateway: Your router's IP address (often 192.168.1.1)
  • 📞 DNS: name servers (you can use public ones from Google: 8.8.8.8)

After entering the data, click "Apply." The system will reconnect to the network with the new settings. This is especially useful if you encounter IP address conflicts or need to access specific network resources using a fixed address.

Working with drivers and additional software

The most difficult part of setting up WiFi on Ubuntu is when the adapter doesn't work due to proprietary drivers. This often happens with chips. Broadcom, Realtek and some models MediaTekFortunately, Ubuntu has a built-in "Additional Drivers" feature that automatically detects and offers to install the necessary components.

To access this tool, open the application menu and find the program Software & Updates (Programs and updates). Go to the tab Additional Drivers (Additional Drivers). The system will search for the hardware. If a driver is available for your WiFi adapter (for example, bcmwl-kernel-source), it will be displayed in the list.

⚠️ Attention: Settings interfaces and package names may vary slightly between Ubuntu versions (20.04, 22.04, 24.04). Always consult your distribution's official documentation if the default paths don't match.

Select the recommended driver (usually marked as "tested" or "recommended") and click "Apply Changes." The installation process will take some time, as the system needs to compile the kernel module for your current version. Once complete, be sure to reboot laptop.

If the graphical tool doesn't help, you can try installing the drivers manually through the terminal, but this requires a temporary internet connection. This can be shared from your Android smartphone via a USB cable (USB tethering), which Ubuntu will detect as a wired Ethernet connection without any additional configuration. The installation commands often look like this:

sudo apt update

sudo apt install bcmwl-kernel-source

Setting up WiFi via the terminal (nmcli)

For system administrators and minimalists, the graphical interface may be overkill. In Ubuntu, the main network management tool is the utility nmcli (Network Manager Command Line Interface). It allows you to perform all the same actions as the GUI, but faster and with scripting capabilities.

First, check the device status. Command nmcli device status will show a list of devices and their status. If the WiFi adapter is disabled, enable it:

nmcli radio wifi on

Next, you need to scan for available networks. The command nmcli device wifi list will display a table with available access points, their signal strength, and security level. Find your network name (SSID) in the SSID column.

To connect, use a command in the following format, replacing the parameters with your own:

nmcli device wifi connect "Network_Name" password "Your_Password"

If the connection is successful, the system will save the profile, and in future, the laptop will connect to this network automatically whenever it is detected. This is especially convenient for setting up headless servers or when working via SSH.

☑️ Diagnostic checklist via terminal

Completed: 0 / 4

It's also convenient to delete old or problematic connections through the terminal. The command nmcli connection delete"ConnectionName" completely removes the profile from the system, which helps if the settings are clogged and preventing a new connection.

Table problems and solutions

Even with proper setup, specific issues may arise. Below is a table to help categorize symptoms and find solutions.

Symptom Possible cause Solution
The network is visible but does not connect. Incorrect password or encryption type Forget the network and re-enter the password, checking the keyboard layout
There is no WiFi icon in the tray The NetworkManager service has stopped. Execute sudo systemctl start NetworkManager
Low speed or breaks Channel conflict or energy saving Disable WiFi power saving in the driver settings.
The adapter is not detected Missing firmware or kernel module Install the package linux-firmware and reboot

The power saving issue is worth mentioning separately. Sometimes Ubuntu disables the WiFi module to conserve battery life, which leads to an unstable connection. To prevent the system from "putting the adapter to sleep," you can create a configuration file. Create the file /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf and write there:

[connection]

wifi.powersave = 2

Meaning 2 means disabling power saving mode for WiFi. After changing the file, you must restart the network service with the command sudo systemctl restart NetworkManager.

Why does WiFi drop out after sleep mode?

The problem often stems from the driver not correctly restoring the device's state after sleep. Solution: Update the system kernel or add a kernel module parameter to the grub configuration to force the module to reload when waking from sleep.

Advanced diagnostics and logs

If none of the above methods help, you need to delve deeper into diagnostics. Linux keeps detailed logs of all events. To view network-related messages, use the utility journalctl. Team journalctl -u NetworkManager -f will start real-time log monitoring. Try connecting to the network and observe the lines that appear.

Errors often contain keywords like "firmware failed," "association lost," or "authentication timeout." You can copy and paste these messages and search for the exact solution in knowledge bases or community forums. It's also helpful to check whether the network management daemon itself is running:

systemctl status NetworkManager

In the line Active: should be written active (running)If there is a status there failed or inactive, try starting the service manually. Sometimes a complete reset of network settings helps, which can be done by deleting the connection configuration files in the folder /etc/NetworkManager/system-connections/ (caution and backup required).

⚠️ Attention: When working with logs and system files, always create backups before deleting or changing configurations. Errors in system files can prevent the network from loading even after a reboot.

Remember that the Ubuntu community is vast. If you encounter a unique error, chances are someone has already solved it on the AskUbuntu forum or in the official documentation. Searching for the exact error text is the fastest way to find a solution.

Frequently Asked Questions (FAQ)

Why doesn't Ubuntu see the WiFi adapter, even though it worked in Windows?

Most likely, Ubuntu doesn't have a proprietary driver installed for your device. In Windows, drivers are often built into the system or installed automatically through the update center, but in Linux, they must be installed manually through the "Additional Drivers" tab or the terminal. Also, check if the "Secure Boot" option is enabled in the BIOS, which can block third-party kernel modules from loading.

How to share WiFi from an Ubuntu laptop?

You can use your laptop as a hotspot. In the graphical interface, go to WiFi settings and select "Use as hotspot." In the terminal, you can do this via nmcli, creating a new connection of the type wifi-hotspotThis is convenient if you have a wired internet connection but need to connect your phone.

Is it safe to use public WiFi networks on Ubuntu?

Basic security in Ubuntu is good, but public networks are always risky. It is recommended to use VPN To encrypt traffic, also make sure folder sharing is disabled in your file manager (Samba) settings to prevent other network users from seeing your files.

Is it possible to set up automatic connection to a hidden network?

Yes, this is possible. When adding a network in the graphical settings, you need to manually enter the name (SSID) and select the security type. nmcli This is done by adding a flag hidden yes when establishing a connection. However, hidden networks consume more battery power because the adapter must constantly poll the airwaves.