How to Connect Wi-Fi on Linux: 5 Methods + Troubleshooting

Connecting to Wi-Fi on Linux can often be challenging for beginners, especially if drivers aren't installed automatically or the network adapter isn't recognized by the system. Unlike Windows or macOS, where the process usually boils down to selecting a network from a list, Linux may require manual configuration via the terminal, installing proprietary drivers, or even compiling kernel modules. This article will help you understand the intricacies of connecting on any distribution—from Ubuntu And Mint to Arch Linux And Fedora.

We'll cover all relevant methods: from simple connections via a graphical interface to complex cases involving missing drivers or hidden networks. We'll pay special attention to troubleshooting issues, such as why Linux might not detect Wi-Fi, how to check adapter compatibility, and what to do if the connection keeps dropping. The instructions are valid for kernel 6.5+ and modern network managers (NetworkManager, connman, wpa_supplicant).

1. Check hardware compatibility

Before setting up a connection, make sure your Wi-Fi adapter is supported by Linux. Most modern chips (Intel AX200, Qualcomm Atheros, Realtek RTL8852AE) work "out of the box", but some models (especially from Broadcom or old ones Realtek) require manual installation of drivers.

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

lspci -knn | grep -iA3 net

Or for USB adapters:

lsusb
  • 🔍 Intel — are usually supported by the kernel, but for newer chips (for example, AX210) a firmware update may be required.
  • ⚠️ Broadcom — often require proprietary drivers (bcmwl-kernel-source).
  • 🛠️ Realtek - new models (for example, RTL8852BE) may require drivers from repositories or GitHub.
  • 📡 Medatek — support has improved in kernel 6.2+, but patches are needed for older chips.
⚠️ Note: If your adapter is not shown in the command output above, it may be disabled in BIOS/UEFI (check your settings Wireless LAN or Wi-Fi Radio) or physically damaged.
📊 Which Linux distribution are you using?
Ubuntu/Debian
Arch/Manjaro
Fedora/RHEL
OpenSUSE
Another

2. Connection via graphical interface (GUI)

The easiest way is to use the built-in network manager. In most distributions, this is NetworkManager (icon in the system tray). Procedure:

  1. Click on the network icon in the upper/lower right corner of the screen.
  2. Select the required network from the list (if it is not there, see the section on hidden networks).
  3. Enter your password and click Connect.

If there is no network icon, run NetworkManager manually:

sudo systemctl start NetworkManager

sudo systemctl enable NetworkManager

Distribution Default Network Manager Command to restart
Ubuntu, Debian, Mint NetworkManager sudo systemctl restart NetworkManager
Arch, Manjaro NetworkManager or dhcpcd sudo systemctl restart NetworkManager dhcpcd
Fedora, RHEL NetworkManager sudo systemctl restart NetworkManager
OpenSUSE wicked or NetworkManager sudo wicked ifdown wlan0 && sudo wicked ifup wlan0
⚠️ Note: In some minimal installations (eg. Arch Linux without DE) the graphical network manager may be missing. In this case, use nmtui (text interface) or wpa_supplicant.

Make sure Wi-Fi is turned on using the physical button (on the laptop)

Check that the adapter is not blocked in rfkill (rfkill list)

Refresh the list of networks (click "Refresh" in the network menu)

Reboot NetworkManager if there are no networks in the list-->

3. Connecting via terminal (nmcli)

If the graphical interface is not available or you prefer the terminal, use the utility nmcli - Part NetworkManagerBasic commands:

View available networks:

nmcli dev wifi list

Connect to the network (replace SSID And password):

nmcli dev wifi connect "SSID" password "password"

For hidden networks, add a flag hidden yes:

nmcli dev wifi connect "SSID" password "password" hidden yes
  • 🔄 To save your settings: nmcli con modify "SSID" connection.autoconnect yes
  • 🔌 View current connections: nmcli con show --active
  • 🚫 Disconnect from the network: nmcli con down "SSID"
  • 🔄 Restart NetworkManager: sudo systemctl restart NetworkManager

4. Manual connection via wpa_supplicant

In systems without NetworkManager (for example, on servers or in Alpine Linux) is used wpa_supplicantThis method requires manual editing of the configuration file.

Steps:

  1. Install wpa_supplicant (if not installed):
  2. sudo apt install wpasupplicant  # Debian/Ubuntu
    

    sudo pacman -S wpa_supplicant # Arch

  3. Create a config:
  4. wpa_passphrase "SSID" "password" | sudo tee /etc/wpa_supplicant/wpa_supplicant.conf
  5. Connect to the network:
  6. sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
    

    sudo dhclient wlan0

For hidden networks, edit the file /etc/wpa_supplicant/wpa_supplicant.conf, adding the line:

scan_ssid=1
⚠️ Note: If you still have no internet access after connecting, check your DNS settings. Add /etc/resolv.conf lines:
nameserver 8.8.8.8

nameserver 1.1.1.1

5. Troubleshooting driver issues

If your Wi-Fi adapter isn't detected or isn't working, the problem is likely with the drivers. Let's look at some typical cases:

5.1 Proprietary Drivers for Broadcom

For chips Broadcom (For example, BCM4313, BCM4360) install the package:

sudo apt install firmware-b43-installer  # Debian/Ubuntu

sudo pacman -S broadcom-wl-dkms # Arch

5.2. Drivers for Realtek (RTL88x2, RTL8723)

New chips Realtek often require drivers from repositories or GitHub. For example, for RTL8852AE:

sudo apt install rtl8852ae-dkms  # Ubuntu 22.04+

git clone https://github.com/lwfinger/rtl8852ae.git

cd rtl8852ae

make

sudo make install

sudo modprobe 8852ae

5.3. Checking blocked devices

Sometimes the adapter is blocked by the system. Check:

rfkill list

If the output contains Soft blocked: yes or Hard blocked: yes, unlock:

sudo rfkill unblock wifi

sudo rfkill unblock all

Symptom Possible cause Solution
The adapter is not visible in ip a Driver missing Install the driver (see above)
The network is visible but does not connect. Incorrect password or encryption type Check wpa_supplicant.conf
Constant connection breaks Weak signal or interference Change the channel on your router or use iwconfig
Low speed (1-2 Mbps) 802.11n/ac mode is disabled Check your router settings (enable WMM, channel width 40 MHz)
How to find out the model of a Wi-Fi adapter without a terminal?

Open your laptop/PC case and locate the sticker on the Wi-Fi module. The model is usually listed in the following format: Intel Wireless-AC 9560 or Qualcomm Atheros QCA6174You can also use Windows on the same device: open Device Manager → Network Adapters and write down the name.

6. Connecting to hidden networks

Hidden networks (with the broadcast SSID disabled) require manual network name entry. Connection methods:

6.1 Via NetworkManager (GUI)

  1. Click on the network icon.
  2. Select Connect to a hidden network (or similar item).
  3. Enter SSID, security type (WPA2-PSK) and password.

6.2. Via nmcli

nmcli dev wifi connect "SSID" password "password" hidden yes

6.3. Via wpa_supplicant

Edit /etc/wpa_supplicant/wpa_supplicant.conf:

network={

ssid="Your_SSID"

scan_ssid=1

psk="your_password"

}

⚠️ Warning: Connecting to hidden networks is less secure than regular networks. The SSID is transmitted in cleartext during scanning, making it easier to intercept traffic. Use hidden networks only in conjunction with WPA3.

7. Connection optimization

If your Wi-Fi is unstable, try the following settings:

7.1 Selecting a channel with minimal interference

Check channel load:

sudo iwlist wlan0 scanning | grep Frequency

Or use linssid:

sudo apt install linssid

sudo linssid

7.2 Forced use of the 802.11ac standard

If the router supports 5 GHz And 802.11ac, but Linux connects in mode 802.11n, add in /etc/NetworkManager/conf.d/wifi_powersave.conf:

[connection]

wifi.powersave = 2

7.3. Disabling energy saving

Power saving mode can cause lag. Disable it:

iwconfig wlan0 power off

To make this permanent, add to /etc/rc.local (to exit 0):

iwconfig wlan0 power off
  • 📶 Increasing transmission power: Some adapters allow you to increase the power (for example, up to 30 dBm). Check supported values:
  • iw reg get
    

    sudo iwconfig wlan0 txpower 30

  • 🔄 Changing the MAC addressIf your router blocks your device by MAC address, change it:
  • sudo ifconfig wlan0 down
    

    sudo macchanger -r wlan0

    sudo ifconfig wlan0 up

8. Troubleshooting

If Wi-Fi is not working, follow these steps to troubleshoot:

  1. Check the physical connection:
  2. ip a | grep wlan

    If interface wlan0 no - the problem is in the driver or hardware.

  3. Check network scanning:
  4. sudo iwlist wlan0 scan | grep ESSID

    If there are no networks, the adapter is not working or is blocked.

  5. Check the kernel logs:
  6. dmesg | grep -i wifi

    Look for errors like firmware missing or failed to load.

  7. Connection test:
  8. ping -c 4 8.8.8.8

    If pings work, but websites don't open, the problem is with DNS.

⚠️ Attention: If in the logs (dmesg) there are messages about CRDA or regulatory domain, set the correct region:
sudo apt install crda

sudo iw reg set RU # For Russia (replace with your region)

sudo dkms autoinstall

sudo update-initramfs -u

-->

FAQ: Frequently Asked Questions

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

First, check whether the adapter is visible in the BIOS/UEFI and whether it is disabled by a physical button (on some laptops). Then:

  1. Install the utility lshw and check the hardware information:
  2. sudo lshw -C network
  3. If the adapter is visible but does not work, look for a driver based on the chip model (see section 5).
  4. For USB adapters, try connecting to a different port (some USB 3.0 ports conflict with Wi-Fi).
How to connect to Wi-Fi without a password (open network)?

For open networks use:

nmcli dev wifi connect "SSID" # No password flag

Or through wpa_supplicant:

network={

ssid="SSID"

key_mgmt=NONE

}

⚠️ Be careful: open networks are often used for "evil twin" attacks. Do not transmit sensitive data without a VPN.

Linux sees the network but won't connect. What's the problem?

Common causes:

  • 🔑 Incorrect password — check the case and symbols.
  • 🔒 Incompatible encryption type - if the router uses WPA3, and your adapter only supports WPA2, try changing your router settings.
  • 📡 Weak signal — check the signal level:
  • iwconfig wlan0 | grep Signal
  • Lack of food — Some USB adapters require connection via a powered hub.
How to automatically connect to Wi-Fi at system startup?

For NetworkManager:

nmcli con modify "SSID" connection.autoconnect yes

For wpa_supplicant add in /etc/rc.local:

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

dhclient wlan0

And make the file executable:

sudo chmod +x /etc/rc.local
Can you use Wi-Fi 6 (802.11ax) on Linux?

Yes, but with some reservations:

  • 🆗 Kernel support: Wi-Fi 6 is supported from the kernel 5.4+, but for full functionality (eg, OFDMA) may require a kernel 6.1+.
  • 🔧 Drivers: Adapters based on Intel AX200/AX210 or Qualcomm FastConnect 6800 usually work without problems. For Realtek RTL8852CE Patches may be required.
  • Performance: Linux is not yet fully optimized for 802.11ax, so the speed may be lower than in Windows on the same hardware.

Check your current kernel version:

uname -r

And update if necessary.