Connecting to Wi-Fi on Linux: 5 Working Methods for Beginners and Pros

Connecting to Wi-Fi on Linux often seems more difficult for beginners than on Windows or macOS. This isn't due to the operating system itself, but to the variety of distributions and tools available: NetworkManager, wpa_supplicant, nmcli or graphical utilities like KDE Plasma And GNOME SettingsEven experienced users sometimes encounter problems when drivers don't recognize the adapter or the network requires non-standard security settings.

In this article, we'll cover all current connection methods—from a simple click in the GUI to manual configuration via the console. You'll learn how to check hardware compatibility, install missing drivers, and troubleshoot common errors like Authentication failed or the absence of networks in the list. And if you're using a rare distribution or an old kernel version, you'll find solutions for your case.

The material is suitable for Ubuntu/Debian, Arch Linux, Fedora and derivatives. All commands have been tested on kernels 5.15–6.8, but most methods also work on older versions. Let's start with the simplest: connecting via the graphical interface.

1. Connection via graphical interface (GUI)

If you use GNOME, KDE, XFCE or another popular DE (Desktop Environment), 90% of Wi-Fi setup tasks can be completed in a few clicks. Let's look at an example. Ubuntu 24.04 with shell GNOME 46, but the logic will be similar for other environments.

Open the network menu in the upper right corner of the screen (Wi-Fi icon or triangle). If there is no icon, check if the network is running. NetworkManager (More on this later). From the list of available networks, select the desired one, enter the password, and confirm the connection. If the network is hidden, click Connect to a hidden network and enter SSID manually.

  • 🔄 Updating the list of networks: If your network is not displayed, click on the Wi-Fi icon and select Refresh the list or reboot NetworkManager team
    sudo systemctl restart NetworkManager
  • 🔒 Password problemsMake sure you're entering your Wi-Fi password, not your router's (they may be different). If the password contains special characters, try entering it in a text editor and then copying it.
  • 📡 Weak signal: In the GUI of some DE (for example, KDE Plasma) you can see the signal strength. If it's low, try moving closer to the router or changing the channel in the router settings.

If the connection fails, check if the network is blocking your connection. MAC filtering on the router. In this case, add the MAC address of your Linux PC to the list of allowed devices. You can find the MAC address of your Wi-Fi adapter using the command:

ip link show | grep ether
📊 Which Linux distribution are you using?
Ubuntu/Debian
Arch Linux/Manjaro
Fedora/RHEL
OpenSUSE
Another

2. Connecting via terminal using nmcli

nmcli - is a console tool for management NetworkManager, which is installed by default in most distributions. It allows you to connect to networks, configure profiles, and diagnose problems without a GUI. Below is a step-by-step guide.

First check if it is running NetworkManager:

systemctl status NetworkManager

If the service is not active, start it:

sudo systemctl start NetworkManager

Now display the list of available networks:

nmcli device wifi list

Find your network in the list and remember it SSIDTo connect, use the command:

nmcli device wifi connect "NETWORK_NAME" password "PASSWORD"

If the network is hidden, add a flag --hidden yes:

nmcli device wifi connect "NETWORK_NAME" password "PASSWORD" --hidden yes

Check NetworkManager status | Make sure your Wi-Fi adapter is enabled (rfkill unblock wifi)|Remember the SSID and network password|Check if the password contains special characters that need to be escaped

-->

⚠️ Attention: If the password contains symbols $, " or \, they need to be escaped with a backslash: nmcli device wifi connect "MyWiFi" password "pa\$\$w0rd"Otherwise, the terminal interprets them as part of a command.

After connecting, check the status:

nmcli connection show

If in the column DEVICE The name of your Wi-Fi adapter is displayed (for example, wlan0), the connection is successful. To disconnect:

nmcli connection down "NETWORK_NAME"

3. Manual connection via wpa_supplicant

wpa_supplicant - is a utility for setting up Wi-Fi at a low level, which works even without NetworkManagerIt's often used on servers or minimalist systems without a GUI. This method requires superuser privileges and basic knowledge of working with configuration files.

First, check if the package is installed:

which wpa_supplicant

If the command returns a path (for example, /usr/sbin/wpa_supplicant), the package is installed. If not, install it:

  • 📦 On Debian/Ubuntu:
    sudo apt install wpasupplicant
  • 📦 On Arch Linux:
    sudo pacman -S wpa_supplicant
  • 📦 On Fedora:
    sudo dnf install wpa_supplicant

Now create a configuration file for your network:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Add the following block to the file (replace NETWORK_NAME And PASSWORD):

network={

ssid="NETWORK_NAME"

psk="PASSWORD"

}

Save the file (Ctrl+O, then Enter) and close the editor (Ctrl+X).

Connect to the network:

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

Then request the IP address from the router:

sudo dhclient wlan0
⚠️ Attention: If after execution wpa_supplicant The network won't connect, check if it's blocking rfkill Wi-Fi adapter. Unlock it with the command sudo rfkill unblock wifi.

4. Diagnosing Wi-Fi Problems on Linux

If Wi-Fi isn't working at all (no networks listed, the adapter isn't detected, or the connection keeps dropping), there could be a variety of reasons, ranging from missing drivers to hardware issues. Let's look at common scenarios and their solutions.

4.1. The Wi-Fi adapter is not detected

Check if the system sees your adapter:

lspci | grep -i network

or for USB adapters:

lsusb

If your device is not listed in the output, the problem may be:

  • 🔌 Physical connection: Reconnect the adapter (especially relevant for USB).
  • 🔄 Blocking rfkill: Check the status with the command rfkill listIf Wi-Fi is blocked, unblock it: sudo rfkill unblock wifi.
  • 🖥️ Lack of drivers: Install proprietary drivers (eg for Broadcom or Realtek).

4.2. Authentication error (Authentication failed)

This error occurs if:

  • ❌ Incorrect password (check case and special characters).
  • 🔒 Incorrect security type (for example, the router uses WPA3, and the client tries to connect as WPA2).
  • 🕒 DHCP lease expired (reboot your router).

Try connecting with an explicit security type:

nmcli device wifi connect "NETWORK_NAME" password "PASSWORD" wifi-sec.key-mgmt wpa-psk

4.3. Constant connection breaks

If the network connects, but the connection is unstable:

  • 📶 Check your signal strength: iwconfig wlan0 | grep SignalIf the value is lower -70 dBm, try moving the router or using a repeater.
  • 🔄 Change the Wi-Fi channel on your router (in the web interface settings). Channels 1, 6 And 11 are usually less busy.
  • 🔋 Disable power saving for your Wi-Fi adapter: sudo iwconfig wlan0 power off.
Symptom Possible cause Solution
There are no networks in the list. The adapter is disabled or there are no drivers. rfkill unblock wifi or installing drivers
Error Activation of network connection failed Incorrect IP settings (DHCP does not issue an address) Check it out sudo dhclient wlan0 or set up a static IP
There is a connection, but no internet Invalid DNS or route sudo resolvectl dns wlan0 8.8.8.8 or check ip route
Slow connection speed Channel congestion or outdated standard (802.11n instead of ac/ax) Change the channel on your router or update your adapter drivers.
How to check the supported Wi-Fi standards of your adapter?

Open the terminal and run the command:

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

Find the lines in the output Freq And VHT:

- 2.4 GHz — standards up to are supported 802.11n (up to 150–300 Mbit/s).

- 5 GHz + VHT — supported 802.11ac (up to 1–3 Gbit/s).

- 6 GHz + HE — supported 802.11ax (Wi-Fi 6/6E).

5. Setting up hidden networks and enterprise networks (WPA2-Enterprise)

Hidden networks and networks with enterprise authentication (such as those at universities or offices) require additional parameters. Let's consider both cases.

5.1 Connecting to a hidden network

If your network does not broadcast SSID, you can connect to it:

  • 🖱️ Via GUI: Select an option Connect to a hidden network and enter SSID manually.
  • 💻 Through nmcli:
    nmcli device wifi connect "NETWORK_NAME" password "PASSWORD" --hidden yes
  • 📝 Through wpa_supplicant: Add a line scan_ssid=1 in the configuration file:
    network={
    

    ssid="NETWORK_NAME"

    psk="PASSWORD"

    scan_ssid=1

    }

5.2 Connecting to WPA2-Enterprise (802.1X)

For networks with Enterprise authentication (e.g. eduroam) you will need:

  1. Install the package wpasupplicant (if not already installed).
  2. Create a config:
    sudo nano /etc/wpa_supplicant/enterprise.conf

    Add block (replace data):

    network={
    

    ssid="eduroam"

    key_mgmt=WPA-EAP

    eap=PEAP

    identity="your_login@domain"

    password="your_password"

    phase2="auth=MSCHAPV2"

    }

  3. Connect:
    sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/enterprise.conf
⚠️ AttentionSome enterprise networks require installation of a root certificate. Download it (usually provided by the network administrator) and specify the path in the configuration file:
ca_cert="/path/to/certificate.pem"

6. Installing drivers for Wi-Fi adapters

If your Wi-Fi adapter isn't detected or is unstable, the cause is often missing or incorrect drivers. Let's look at how to install them for popular chipsets.

6.1. Checking the adapter model

Find out the model of your adapter:

lspci -knn | grep -iA3 network

or for USB:

lsusb

In the output, find the line with Network controller or Wireless. For example:

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

Here 8086:2723 - This Vendor:Device ID, by which you can find the driver.

6.2. Installing drivers for popular chipsets

Manufacturer Chipset models Driver Installation command
Intel AX200, AX201, AX210, 9260 iwlwifi (part of the core) Install the firmware: sudo apt install firmware-iwlwifi
Broadcom BCM43xx b43 or wl sudo apt install firmware-b43-installer or sudo apt install broadcom-sta-dkms
Realtek RTL8188, RTL8192, RTL8821 rtl8xxxu or rtlwifi Install from repositories or compile with GitHub
Qualcomm Atheros AR9285, AR9462 ath9k (part of the core) Install the firmware: sudo apt install firmware-atheros

For Realtek and some Broadcom Manual compilation of drivers may be required. For example, for RTL8821CE:

git clone https://github.com/tomaspinho/rtl8821ce

cd rtl8821ce

make

sudo make install

sudo modprobe 8821ce

⚠️ AttentionAfter updating the Linux kernel, custom drivers may stop working. To avoid problems, use DKMS (Dynamic Kernel Module Support):
sudo apt install dkms

sudo dkms add -m rtl8821ce -v 1.0

sudo dkms build -m rtl8821ce -v 1.0

sudo dkms install -m rtl8821ce -v 1.0

7. Automatic connection at system startup

To make Linux connect to Wi-Fi automatically on boot, configure NetworkManager or systemdLet's consider both options.

7.1. Setting up auto-connection in NetworkManager

If you use nmcli, make the network a priority:

nmcli connection modify "NETWORK_NAME" connection.autoconnect yes

Check priority:

nmcli connection show

Network with the smallest value AUTOCONNECT PRIORITY will connect first.

7.2. Auto-connection via wpa_supplicant + systemd

Create a service to run automatically wpa_supplicant:

sudo nano /etc/systemd/system/wpa_supplicant@.service

Add:

[Unit]

Description=WPA supplicant daemon

After=sys-subsystem-net-devices-%i.device

[Service]

Type=simple

ExecStart=/sbin/wpa_supplicant -u -i %I -c /etc/wpa_supplicant/wpa_supplicant.conf

Restart=always

RestartSec=5

[Install]

WantedBy=multi-user.target

Activate the service:

sudo systemctl enable wpa_supplicant@wlan0

sudo systemctl start wpa_supplicant@wlan0

To automatically obtain an IP, add a similar service for dhclient:

sudo nano /etc/systemd/system/dhclient@.service
[Unit]

Description=DHCP Client

After=wpa_supplicant@%i.service

[Service]

Type=forking

ExecStart=/sbin/dhclient %I

Restart=always

[Install]

WantedBy=multi-user.target

Activate:

sudo systemctl enable dhclient@wlan0

8. Alternative connection methods

If standard methods don't work, try alternative tools or workarounds.

8.1. Use nmtui (TUI for NetworkManager)

nmtui - is a text interface for NetworkManager, convenient for servers without a GUI. Run it:

sudo nmtui

Select Activate a connection, find your network in the list and connect.

8.2. Connection via iwconfig And dhclient (obsolete method)

This method works on older systems, but is not recommended for modern distributions:

sudo ifconfig wlan0 up

sudo iwconfig wlan0 essid "NETWORK_NAME" key "PASSWORD"

sudo dhclient wlan0

8.3. Sharing Wi-Fi from your phone (as a backup option)

If you can't set up Wi-Fi on Linux, temporarily use your phone as a hotspot:

  1. Turn on Modem mode in the phone settings.
  2. Connect to the network being created as you would to a regular Wi-Fi network (see section 1 or 2).
  3. For stability, disable power saving on your phone.
alias wifi-home='nmcli device wifi connect "MyHomeWiFi" password "mypassword"'

After this, you can connect with a short command wifi-home.-->

FAQ: Frequently Asked Questions about Wi-Fi Connections on Linux

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

First, check if the system sees the adapter with the command lspci or lsusbIf the device is in the list but does not work:

  1. Check if the adapter is blocked: rfkill list.
  2. Install the drivers (see section 6).
  3. Check kernel logs: dmesg | grep -i wifi.

If your adapter isn't listed, check the physical connection (especially for USB devices) or try a different port.

How to connect to Wi-Fi without a password (open network)?

For open networks use:

  • In GUI: Select a network and connect without entering a password.
  • IN nmcli:
    nmcli device wifi connect "NETWORK_NAME"
  • IN wpa_supplicant: Add to config:
    network={
    

    ssid="NETWORK_NAME"

    key_mgmt=NONE

    }

⚠️ Be careful: open networks are unsafe. Don't transmit sensitive data without a VPN.

Why is Wi-Fi speed slower on Linux than on Windows?

Possible causes and solutions:

  • Drivers: Install proprietary drivers (eg. wl for Broadcom).
  • Power saving mode: Turn it off: sudo iwconfig wlan0 power off.
  • Wi-Fi standard: Check that the router and adapter work in the same standard (for example, 802.11ac).
  • Channel congestion: Change the channel on your router to a less busy one (use iwlist wlan0 scan | grep Frequency for analysis).
How do I save my Wi-Fi password so I don't have to enter it every time?

NetworkManager Automatically saves passwords in encrypted form. To check saved networks:

nmcli connection show

If the network is not saved:

  1. Make sure you have write access to /etc/NetworkManager/system-connections/.
  2. Check if the flag is set no-auto-default V /etc/NetworkManager/NetworkManager.conf.

Passwords are stored in network configuration files. You can view the password like this:

sudo grep psk /etc/NetworkManager/system-connections/*
Is it possible to connect to Wi-Fi 6 (802.11ax) on Linux?

Yes, but it requires:

  • Adapter with support Wi-Fi 6 (For example, Intel AX200/AX210 or Qualcomm FastConnect 6800).
  • Linux kernel version 5.4+ (for full support 802.11ax).
  • Driver with support HE (High Efficiency). For Intel This iwlwifi from the core 5.10+.

Check support:

iw list | grep -i "HE"

If the output contains HE Iftypes, your adapter supports Wi-Fi 6.