How to Connect to Wi-Fi on Ubuntu: From Beginner to Pro

The Linux operating system, and in particular the distribution Ubuntu, has long ceased to be the exclusive domain of programmers and system administrators. Today, it's a full-fledged work environment for millions of users worldwide, offering stability, security, and flexibility. However, despite significant advances in hardware support, the issue of wireless connectivity often becomes the first obstacle users encounter after installing the system. Unlike WindowsWhile drivers are often built in by the hardware manufacturer, in the Linux world manual intervention is sometimes required to activate network modules.

Wireless network connectivity can range from instant automatic network detection to complete adapter failure without any prior configuration. This depends on a variety of factors, including the model of your Wi-Fi adapter, the system kernel version, and the presence of proprietary drivers. Understanding the network operating mechanisms in Ubuntu gives you not only internet access but also control over connection stability, which is critical for remote work or streaming.

In this guide, we'll cover all aspects of setup: from simple GUI steps to advanced terminal methods. We'll cover common errors, diagnostic methods, and ways to force-enable network cards that are ignored by the system by default. Even if you've never opened a command prompt, these step-by-step instructions will help you navigate the process and enjoy fast internet.

Checking compatibility and availability of drivers

Before attempting to enter the network password, you need to make sure that the operating system can actually "see" your wireless module. Ubuntu The network manager is responsible for network management, but it requires the correct drivers to interact with the physical hardware. Often, the problem lies in the lack of firmware for specific chipsets, especially if you're using new laptops or specific USB adapters.

For initial diagnostics, you can use built-in utilities. Open a terminal and enter the command lspci | grep -i network for internal cards or lsusb For external devices. If the device appears in the list but doesn't work, it's most likely a software issue. Drivers may either be already in the kernel but disabled, or require separate installation.

  • 📡 Check if the physical Wi-Fi switch on your laptop is turned on, if there is one.
  • 🔌 Make sure the USB adapter is firmly inserted into the port and is detected by the system as a new device.
  • 💻 Use a temporary wired connection or USB modem to download missing components.

⚠️ Attention: Network manager interfaces and package names may differ depending on the distribution version (e.g., 20.04 LTS vs. 24.04 LTS). Always check the package names in the official documentation for your specific Ubuntu version, as the repositories are updated regularly.

If the system reports missing drivers, don't panic. In most cases, Ubuntu It can automatically detect and offer installation of necessary components if you have any network access. Owners of laptops with hybrid graphics cards or complex network modules may need to disable Secure Boot in the BIOS, as it often blocks the loading of third-party kernel modules.

📊 What type of internet connection do you have to install drivers?
Wired Ethernet
Smartphone via USB (RNDIS)
Another PC via LAN
No network access

Connecting via the GNOME graphical interface

For most users of the standard GNOME desktop, the connection process is extremely simple and doesn't require knowledge of console commands. In the upper right corner of the screen is the system tray, which displays network indicators. Clicking on the icon displays a drop-down menu with a list of available wireless networks within range of your router.

Select the desired network from the list. If it is password-protected (indicated by a lock icon), the system will request authorization information. Enter the security key, making sure it is capitalized correctly, and click "Connect." The system will attempt to obtain an IP address via DHCP and establish a connection. If successful, a check mark will appear next to the network name, and a signal strength indicator will appear in the system tray.

Sometimes manual configuration is required, for example, for corporate networks or static IP addresses. To do this, select "Network Settings" in the network menu. Here you can configure IPv4 and IPv6 in detail, manually enter DNS servers, and manage connection priorities. This is especially useful if automatic address allocation on your local network is not working correctly.

The graphical interface also allows you to manage hidden networks. If your router isn't broadcasting its SSID, select "Connect to Hidden Network" in the Wi-Fi menu. You'll need to know the exact network name and encryption type (usually WPA2 or WPA3). A single character error in the network name will prevent you from connecting, so be careful when entering the information.

Setting up Wi-Fi via Terminal and nmcli

For system administrators and minimalism lovers, this utility is ideal. nmcli (NetworkManager command line interface). It allows you to manage network connections without a graphical shell, making it indispensable for server versions. Ubuntu Server or when troubleshooting graphical bugs. Working with the command line gives more granular control over the connection process.

The first step is always to scan for available networks. Run the command nmcli device wifi listto see a list of available access points, their channels, signals, and security status. Found networks will be displayed in a table. If the desired network is not listed, ensure the Wi-Fi adapter is enabled using the command nmcli radio wifi on.

nmcli device wifi connect "Network_Name" password "Your_Password"

This command initiates the connection process. If successful, you will receive a connection activation message. For more complex scenarios, such as connecting to corporate networks with certificates or a hidden SSID, the command syntax is expanded with additional parameters. For example, for a hidden network, add the flag hidden yes.

  • 🛠 Use it nmcli connection show to view all saved connection profiles.
  • 🗑 Delete old profiles with the command nmcli connection delete "Profile_Name", if conflicts arise.
  • 🔄 You can restart the network manager with the command sudo systemctl restart NetworkManager.

☑️ Diagnostic checklist via terminal

Completed: 0 / 1

It's important to understand the difference between a device and a connection. A device is a physical or logical interface (e.g., wlp2s0), and a connection is a set of settings (SSID, password, IP) associated with that device. You can have multiple connection profiles for a single physical adapter and switch between them as needed.

Installing proprietary drivers

One of the most common reasons for Wi-Fi not working is the lack of proprietary drivers, especially for Broadcom chips and some Realtek models. The Linux community creates excellent open-source drivers, but sometimes proprietary solutions from manufacturers perform more reliably or support new features. Ubuntu provides a convenient mechanism for searching and installing such drivers.

To access this tool, you'll need a temporary internet connection (via cable or USB modem). Open the "Software & Updates" app and go to the "Additional Drivers" tab. The system will scan your hardware and offer available driver options for your device.

Chip manufacturer Typical driver package Support status
Broadcom bcmwl-kernel-source Proprietary (often needed)
Realtek firmware-realtek Open / Firmware
Intel firmware-iwlwifi Open (in core)
MediaTek firmware-misc-nonfree Depends on the model

If a recommendation to use a proprietary module appears in the list of additional drivers, select it and click "Apply Changes." The system will download the necessary packages, compile the module for the current kernel, and restart the network service. After this, Wi-Fi should work. In some cases, especially with new adapters, the standard repositories may not be sufficient, and you will have to build the driver from the source code on GitHub, but this is a task for advanced users.

⚠️ Attention: When installing drivers from third-party sources (PPA or manual build), always check compatibility with your kernel version. Updating the system kernel may break a manually installed driver, and you'll have to repeat the process.

What should I do if the Broadcom driver fails to install?

The problem is often with the bcmwl-kernel-source package. Try removing it completely (sudo apt purge bcmwl-kernel-source), rebooting, and then reinstalling it via Additional Drivers or with sudo apt install bcmwl-kernel-source. Make sure the linux-headers package is installed.

Solving common connection problems

Even with proper configuration, situations may arise where the connection is unstable or completely disconnected. One common issue is power management conflicts. NetworkManager By default, the Wi-Fi adapter may switch to power-saving mode, which can result in connection drops or failure to connect. Disabling this feature often resolves the issue of "jumpy" ping.

To disable power saving, create or edit a configuration file. You need to add the line wifi.powersave = 0 into the configuration file. This will prevent the system from reducing the adapter's power. It's also worth checking your router settings: sometimes the problem lies with the Wi-Fi channel. If neighboring networks are using the same channel, interference occurs.

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

Another common scenario is incorrect time and date settings. WPA2/WPA3 encryption protocols are time-sensitive. If your computer's clock is significantly ahead or behind, handshake with the router will fail, and you'll receive an authentication error, even if the password is entered correctly. Synchronize the time online or manually in the BIOS/UEFI.

  • 📅 Check your system time: command date will show the current settings.
  • 🔁 Reset network settings: sudo nmcli networking off and then sudo nmcli networking on.
  • 📡 Change the channel on your router to 1, 6, or 11 for the 2.4 GHz band to avoid interference.

Setting up static IP and DNS

In some cases, dynamic address acquisition (DHCP) does not work correctly, or you need a fixed address to access network resources, printers, or servers. Setting up a static IP address in Ubuntu This can be done through a graphical interface or terminal. It's also a great way to circumvent slow domain name resolution by changing your DNS to faster servers, such as those from Google or Cloudflare.

In the graphical interface, go to network settings, select your Wi-Fi profile, and click the gear icon. The IPv4 tab allows you to switch the method from "Automatic" to "Manual." Here, you'll need to enter the IP address (e.g., 192.168.1.50), subnet mask (usually 255.255.255.0), gateway (router address), and DNS servers. An incorrect gateway address will prevent you from connecting to the internet, even if your local network is working.

When setting up via nmcli The process is as follows: first, modify the connection by setting the method to manual, then add the address and gateway. After applying the settings, the connection must be reconnected. Using public DNS, such as 1.1.1.1, often speeds up website response times and improves browsing security by protecting against provider DNS spoofing.

How to quickly check your current DNS and IP?

Use the command nmcli device show for detailed information about the current connection. In the IP4 section, you'll see the assigned address, gateway, and DNS servers. For a simple check of the external IP, you can use curl: curl ifconfig.me.

Why isn't 5GHz Wi-Fi working?

In some regions, 5 GHz channels may be restricted by default. Check the country code in the Wi-Fi control settings with the command sudo iw reg getIf the code is "00" or incorrect, set the correct one (for example, RU or US) using the command sudo iw reg set RUAlso, make sure that your router is actually broadcasting the network in this range.