How to Connect Wi-Fi on Ubuntu: A Complete Guide for Beginners and Advanced Users

Wireless internet connection on Ubuntu may seem like a daunting task, especially if you are used to automatic setup in Windows or macOSIn practice, the process takes no more than 5 minutes, provided your adapter is supported by the system. However, sometimes users encounter problems: the network isn't displayed, the password isn't accepted, or the connection keeps dropping. In this article, we'll cover all connection methods—from basic setup via the graphical interface to manually adding a network via the terminal and troubleshooting common errors.

Peculiarity Ubuntu (and other distributions Linux) is that drivers for Wi-Fi adapters aren't always installed automatically. If your device is new or rare, you may need to manually install proprietary drivers. We'll explain in detail how to check adapter compatibility, where to download the latest drivers, and how to install them without risking system corruption. You'll also learn how to connect to hidden networks, set connection priority, and troubleshoot slow speeds.

The article is relevant for Ubuntu 22.04 LTS, 24.04 LTS and other modern versions. If you are using an older version (for example, 18.04), some commands and menu paths may differ - check them in the official documentation Canonical.

1. Preparation: Checking the compatibility of the Wi-Fi adapter

Before setting up your network, make sure your Wi-Fi adapter is recognized by the system. Many modern laptops (for example, Dell XPS, Lenovo ThinkPad or HP Pavilion) use adapters Intel, Broadcom or Realtek, which are usually supported Ubuntu "out of the box". However, some models (especially with chips) Broadcom BCM43xx) require additional drivers.

To check if the adapter is detected, run the following command in the terminal:

lspci -knn | grep -iA3 net

In the output, look for lines mentioning Network controller. For example:

03:00.0 Network controller [0280]: Intel Corporation Wi-Fi 6 AX200 [8086:2723] (rev 1a)

Subsystem: Intel Corporation Wi-Fi 6 AX200NGW [8086:0024]

Kernel driver in use: iwlwifi

Kernel modules: iwlwifi

If in the line Kernel driver in use the driver is specified (for example, iwlwifi, rtl8821ce or b43), the adapter is recognized. If instead of the driver you see Kernel modules: none or an error, you will need to install the driver manually (more on this in the next section).

📊 What Wi-Fi adapter does your device use?
Intel
Broadcom
Realtek
Qualcomm Atheros
Don't know
Another

2. Installing Wi-Fi drivers (if the adapter is not recognized)

If your adapter is not detected or the network is not working, the problem is most likely due to missing drivers. Ubuntu offers two ways to install them: through proprietary drivers (closed software from the manufacturer) or open source driversThe first option is usually more reliable, but may conflict with the system kernel.

To install the driver:

  1. Open Programs and updates (Software & Updates) via the applications menu.

  2. Go to the tab Additional drivers (Additional Drivers).

  3. Wait while the system scans for available drivers. If the adapter is supported, you will see a list of options (e.g. Broadcom 802.11 Linux STA wireless driver).

  4. Select the recommended driver and click Apply changes (Apply Changes). After installation, restart your computer.

If the drivers are not listed, try installing them manually through the terminal. For example, for adapters Broadcom the command often helps:

sudo apt install firmware-b43-installer

For adapters Realtek RTL88x2bu/RTL88x2cu (popular in USB adapters) you may need to install the driver from the repository:

sudo add-apt-repository ppa:kelebek333/kablosuz

sudo apt update

sudo apt install rtl88x2bu-dkms

⚠️ Attention: After installing the drivers via PPA (personal repositories), update the system with the command sudo apt upgradeIn some cases, new drivers may conflict with the kernel. If Wi-Fi doesn't work after a reboot, try rolling back the changes or installing a different driver version.

Restart your computer after installation

Check the output of `lspci -knn | grep -iA3 net` (the driver should appear)

Make sure the Wi-Fi indicator on your laptop is lit (if applicable)

Try connecting to the network through the GUI-->

3. Connecting to Wi-Fi via a graphical interface

If the adapter is recognized and the drivers are installed, the easiest way to connect to the network is through the standard network manager. NetworkManagerThe instruction is suitable for Ubuntu Desktop (with the entourage GNOME):

  1. Click the network icon in the upper right corner of the panel (near the clock). If the icon is missing, check if the network is running. NetworkManager team systemctl status NetworkManager.

  2. Select the desired network from the drop-down list. If it is not there, click Wi-Fi is not turned on (Wi-Fi Not Enabled) and activate the adapter.

  3. Click on the network name, enter the password and press Connect (Connect).

If the network is secure WPA3, and your adapter or router does not support it, try temporarily switching the router to WPA2-PSK (in the router's wireless network settings). Also, make sure the password doesn't contain Cyrillic characters or spaces—some versions NetworkManager they are processed incorrectly.

To save the connection automatically when the system starts, check the box. Connect automatically (Connect Automatically) when you first connect. If the option is missing, check the settings in Settings → Network (Settings → Network).

4. Connecting to a hidden Wi-Fi network

Hidden networks (with SSID broadcast disabled) don't appear in the list of available connections, but you can connect to them manually. To do this:

  1. Click on the network icon and select Wi-Fi settings (Wi-Fi Settings).

  2. At the bottom of the list of networks, click Connect to hidden network... (Connect to Hidden Network...).

  3. Enter exact network name (SSID) — case is important! For example, MyWiFi_5G And mywifi_5g will be perceived as two different networks.

  4. Please specify the security type (WPA2/WPA3) and password. Click Connect.

If the connection fails, check:

  • ✅ Correctness of the entered information SSID (ask your network administrator).
  • ✅ Does your adapter support the selected encryption type (for example, older adapters may not work with WPA3).
  • ✅ Is there any filtering in the router? MAC-addresses (if yes, add MAC your adapter to the white list).
⚠️ Attention: Hidden networks do not provide additional security - their name can still be determined using traffic analyzers (for example, Wireshark). Use hidden SSIDs only to reduce the number of connections made by mistake.

5. Connecting to Wi-Fi via a terminal (for server versions or without a GUI)

If you use Ubuntu Server or a version without a graphical interface, you can connect to Wi-Fi via nmcli (management utility NetworkManager) or wpa_supplicantLet's consider both methods.

Method 1: via nmcli

Check the list of available networks:

nmcli device wifi list

Connect to the network (replace SSID And password to current ones):

nmcli device wifi connect "SSID" password "password"

Method 2: via wpa_supplicant (for advanced users)

Edit the configuration file:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Add a network settings block (example for WPA2-PSK):

network={

ssid="SSID"

psk="password"

key_mgmt=WPA-PSK

}

Connect to the network:

sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

sudo dhclient wlan0

To keep the connection after reboot, add wpa_supplicant to startup or configure netplan (in modern versions Ubuntu).

Team Description Output example
iwconfig Shows the status of wireless interfaces wlan0 IEEE 802.11 ESSID:"MyWiFi"
ip a Displays the IP addresses of all interfaces. inet 192.168.1.100/24
ping 8.8.8.8 Checking your internet connection 64 bytes from 8.8.8.8: icmp_seq=1 ttl=117
sudo dmesg | grep wifi Viewing kernel logs to diagnose problems [ 1234.567890] iwlwifi 0000:03:00.0: loaded firmware version 59.601f3a66.0

6. Troubleshooting Common Wi-Fi Problems on Ubuntu

Even after a successful connection, problems may arise: slow speed, frequent connection drops, or no internet connection while connected. Let's look at the most common issues and how to resolve them.

Problem 1: The network is connected, but there is no internet

  • 🔄 Check if the device is receiving IP address team ip aIf the address is of the type 169.254.x.x, Means, DHCP didn't work - restart the network:
  • sudo dhclient -r wlan0
    

    sudo dhclient wlan0

  • 🌐 Make sure your router is turned on DNSCheck the connectivity with Google DNS:
  • ping 8.8.8.8
  • 🔧 If the ping works but websites don't open, ping the domain (for example, ping google.com). If there is no response, manually enter the DNS in /etc/resolv.conf:
  • nameserver 8.8.8.8
    

    nameserver 8.8.4.4

Problem 2: Low speed or frequent interruptions

  • 📶 Check the signal level with the command iwconfig wlan0. If Signal level below -70 dBm, you are too far from the router.
  • 🔄 Switch to another channel in the router settings (for example, from 6 on 11) to avoid interference from neighboring networks.
  • 🛠️ Disable power saving for your Wi-Fi adapter (may cause delays):
  • sudo iwconfig wlan0 power off

Problem 3: Wi-Fi works but does not persist after reboot

If the connection drops, check:

  • ⚙️ Settings netplan (in modern versions Ubuntu):
  • sudo nano /etc/netplan/01-netcfg.yaml
  • 🔄 Autoload NetworkManager:
  • sudo systemctl enable NetworkManager
What to do if nothing helps?

If none of the above worked, try:

1. Connect to the network via Ethernet and update the system (sudo apt update && sudo apt upgrade).

2. Install a newer kernel version (sudo apt install linux-generic-hwe-22.04 for Ubuntu 22.04).

3. Use an external USB Wi-Fi adapter (for example, TP-Link TL-WN725N), which is guaranteed to be supported by Linux.

4. Check your router for MAC address restrictions or enabled "client isolation mode".

7. Optimize your Wi-Fi connection

To improve Wi-Fi stability and speed, adjust the following settings:

1. Connection priority

If you have multiple networks (eg. MyWiFi_2.4G And MyWiFi_5G), set the priority for the preferred network:

nmcli connection modify "MyWiFi_5G" connection.autoconnect-priority 10

2. Disable IPv6 (if not used)

Some routers don't work well with IPv6To disable it for a specific connection:

nmcli connection modify "SSID" ipv6.method disabled

3. Configuring MTU

If packets are fragmented (for example, when using VPN), reduce MTU:

sudo ifconfig wlan0 mtu 1400

To save the changes, add the line to /etc/network/interfaces:

mtu 1400

4. Using 5 GHz instead of 2.4 GHz

Net 5 GHz It's less congested and provides higher speeds, but has a shorter range. If your adapter supports 802.11ac (Wi-Fi 5) or 802.11ax (Wi-Fi 6), connect to it. To check the supported standards, run:

iw list | grep -A 10 "Supported interface modes"

FAQ: Frequently Asked Questions about Wi-Fi on Ubuntu

My Wi-Fi adapter isn't detected at all. What should I do?

If the team lspci or lsusb your adapter is not shown, try:

  1. Connect the adapter to another USB port (if it is an external device).
  2. Check if the adapter is disabled in BIOS/UEFI (especially relevant for laptops) Lenovo And HP).
  3. Install the latest kernel version:
  4. sudo apt install linux-generic-hwe-22.04
  5. Check the adapter on another device (for example, Windows) to rule out hardware failure.
How to connect to Wi-Fi without a password (open network)?

To connect to an open network (without encryption) via terminal, use:

nmcli device wifi connect "SSID" --ask

When prompted for a password, simply click EnterIn the graphical interface, select the network and connect without entering a password.

⚠️ Attention: Open networks are unsafe—your traffic can be intercepted. Avoid transmitting sensitive data (passwords, banking details) without permission. VPN.
Is it possible to connect to Wi-Fi via WPS?

Ubuntu does not support WPS (Wi-Fi Protected Setup) using standard tools, as this protocol is considered insecure. Instead, use:

  • 🔑 Connection with a password (recommended).
  • 📱 If the router supports QR code To connect, scan it with your smartphone and enter the password manually.
How to share Wi-Fi with Ubuntu (access point mode)?

To transform Ubuntu to the access point, install hostapd And dnsmasq:

sudo apt install hostapd dnsmasq

Set up configuration files /etc/hostapd/hostapd.conf And /etc/dnsmasq.conf, then start the service:

sudo systemctl start hostapd

sudo systemctl start dnsmasq

For detailed instructions, see the official documentation. Ubuntu.

Why does WiFi work in Windows but not in Ubuntu?

This is a typical situation for adapters with proprietary drivers. Solutions:

  • 🔧 Install the driver via Additional drivers (cm. Section 2).
  • 🖥️ Use it Windows driver through ndiswrapper (not recommended for beginners).
  • 🔄 Update your kernel to the latest version - new versions often include support for new adapters.