Connecting to Wi-Fi on Linux can seem daunting for beginners, especially if you're used to automatic settings in Windows or macOS. However, after the first successful connection, the process becomes intuitive. The key is to understand the drivers, network management utilities, and specific features of your distribution.
In this article, we'll cover every step: from checking hardware compatibility to setting up hidden networks and troubleshooting common issues. You'll learn how to connect to Wi-Fi through the graphical interface and terminal, what commands to use for diagnostics, and what to do if the network keeps disconnecting. We'll pay special attention to drivers, the most common cause of problems.
The instructions are relevant for most modern distributions: Ubuntu, Debian, Fedora, Arch Linux, Linux Mint and their derivatives. If you're using a rare distribution or exotic hardware, some steps may differ, but the general principles remain the same.
1. Check hardware compatibility
Before setting up a connection, make sure your Wi-Fi adapter is supported by Linux. Most modern chips (for example, from Intel, Qualcomm Atheros, Realtek RTL88xx) have open drivers, but some models (especially newer ones) may require proprietary software.
To check if the adapter is present in the system, run the command:
lspci | grep -i network
For USB adapters use:
lsusb
If the output contains lines mentioning Network controller or Wireless — the adapter is detected. No result means either the device is not recognized by the kernel or is disabled in the BIOS/UEFI.
- 🔍 Intel Wireless-AC 9560/9260/8265 — are supported out of the box in most distributions.
- 🔌 Realtek RTL8188EU/RTL8821CE — may require installation of drivers from repositories or compilation from source.
- 🚫 Broadcom BCM43xx — often require proprietary drivers (
bcmwl-kernelorbroadcom-sta). - ⚠️ Mediatek MT7921/MT76xx - support is improving, but newer chips may require kernel 6.0+.
⚠️ Attention: Laptop manufacturers sometimes block the replacement of the Wi-Fi module in the BIOS (especially on devices with Intel vPro or Lenovo Whitelist). If you are planning an upgrade, check compatibility in advance.
2. Installing Wi-Fi drivers
If the adapter is detected but the network isn't working, there's likely a driver issue. Linux uses two types of drivers:
- 🐧 Open source — are part of the core (for example,
iwlwififor Intel,ath9kfor Atheros). - 🔒 Proprietary - closed drivers from the manufacturer (for example,
NVIDIAfor some Broadcom chips).
To find out which driver is being used, run:
lspci -k | grep -A 3 -i network
If there is a line in the output Kernel driver in use: [name] — the driver is loaded. If it is not there or it says Kernel modules: [empty], the driver is missing.
| Chip manufacturer | Recommended driver | Installation command (Debian/Ubuntu) |
|---|---|---|
| Intel | iwlwifi (in the core) |
sudo apt install firmware-iwlwifi |
| Broadcom | bcmwl-kernel or broadcom-sta |
sudo apt install broadcom-sta-dkms |
| Realtek (RTL88xx) | rtl8821ce-dkms or rtl88x2bu |
sudo apt install rtl8821ce-dkms |
| Mediatek (MT76xx) | mt76 (in kernel 5.12+) |
sudo apt install firmware-misc-nonfree |
For distributions based on Arch Linux use pacman or yay:
yay -S rtl8821ce-dkms-git # For Realtek RTL8821CE
⚠️ Attention: After installing proprietary drivers (for example, for Broadcom), you may need to disable conflicting open modules. To do this, add them to the blacklist:
echo "blacklist b43" | sudo tee -a /etc/modprobe.d/blacklist.conf3. Connecting to Wi-Fi via a graphical interface
If the driver is installed, the easiest way to connect is through the standard tools of the desktop environment (GNOME, KDE Plasma, XFCE etc.). Let's look at the process using an example. Ubuntu with GNOME:
- Click on the network icon in the upper right corner of the panel.
- Select the desired network from the list.
- Enter the password (if the network is secured) and click Connect.
IN KDE Plasma the path will be like this:
System Settings → Network → Wi-FiHere you can save multiple profiles and manage connection priorities.The adapter is enabled in BIOS/UEFI|
Driver installed and loaded|
The network is visible in the list of available ones|
The password was entered correctly (case sensitive!)-->
If there is no network icon or it is crossed out, check:
- 🔄 Is the service running?
NetworkManager:sudo systemctl status NetworkManagerIf not, run it:
sudo systemctl start NetworkManager- 🔌 Is Wi-Fi enabled in software?
rfkill listIf the output contains
Soft blocked: yes, unlock:rfkill unblock wifi📊 Which Linux distribution are you using?Ubuntu/DebianArch Linux/ManjaroFedora/RHELOpenSUSEAnother4. Connecting to Wi-Fi via the terminal
If the graphical interface is not available or you prefer the console, use utilities
nmcli(ForNetworkManager) oriwconfig/wpa_supplicant.Method 1: via nmcli
- View the list of available networks:
nmcli device wifi list- Connect to the network (replace
SSIDAndpassword):nmcli device wifi connect "SSID" password "password"Method 2: via wpa_supplicant (for advanced users)
- Edit the config
/etc/wpa_supplicant/wpa_supplicant.conf:wpa_passphrase "SSID" "password" | sudo tee -a /etc/wpa_supplicant/wpa_supplicant.conf- Connect to the network:
sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.confThen get the IP:
sudo dhclient wlan0To check if the connection is successful, use:
ip a show wlan0 # Checking the IP address
ping -c 4 8.8.8.8 # Check network access5. Setting up hidden networks (hidden SSID)
If your router hides the network name (the broadcast SSID is disabled), connecting using the standard method will not work. In this case:
Via graphical interface (GNOME):
- Click on the network icon → Wi-Fi settings.
- Click Connect to a hidden network.
- Enter
SSID, security type (WPA2-PSK) and password.Via terminal (nmcli):
nmcli connection add type wifi con-name "MyHiddenWiFi" ifname wlan0 ssid "HiddenSSID"nmcli connection modify "MyHiddenWiFi" wifi-sec.key-mgmt wpa-psk
nmcli connection modify "MyHiddenWiFi" wifi-sec.psk "password"
nmcli connection up "MyHiddenWiFi"For
wpa_supplicantadd the following line to the config:scan_ssid=1⚠️ Attention: Hiding the SSID does not improve network security—that's a myth. An attacker can easily detect such a network using traffic analyzers (e.g., Wireshark or Airodump-ng). For protection, use WPA3 and a complex password.6. Solving typical problems
If Wi-Fi is not connecting or keeps dropping out, check the following:
Symptom Possible cause Solution The network is visible but does not connect. Incorrect password or encryption type Make sure your router is turned on WPA2-PSK(NotWEP!)Constant connection breaks Weak signal or interference Change the channel in the router settings (for example, to 6or11in the 2.4 GHz range)The adapter is not detected The driver is not loaded or there is a module conflict. Check it out dmesg | grep firmwarefor loading errorsSlow connection speed Legacy standard (802.11n instead of 802.11ac) Turn on 802.11acin the router and adapter settingsIf the network connects, but the Internet does not work:
- 🔄 Check if the device receives an IP:
ip a show wlan0If the address is of the type
169.254.x.x— DHCP didn't work. Try manually:sudo dhclient -r wlan0 # Reset
sudo dhclient wlan0 # Retry request- 🌍 Check DNS:
cat /etc/resolv.confIf there are no lines with
nameserver, add Google DNS:echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolv.confHow to check Wi-Fi signal strength?
Run the command:
iwconfig wlan0 | grep -i signalThe output will contain a line like this:
Signal level=-56 dBmThe closer the value is to0, the stronger the signal:
-30 dBm- excellent signal-60 dBm- average-80 dBm- weak (breaks are possible)If the signal is weak, try moving the router or using a repeater.
7. Optimize your Wi-Fi connection
To improve Wi-Fi stability and speed on Linux, make the following adjustments:
1. Select a channel with minimal interference
Use the utility
iwlistto scan the air:sudo iwlist wlan0 scanning | grep -E "Channel|Signal"Then, in the router settings, select the least loaded channel (for example,
1,6or11for 2.4 GHz).2. Enabling power saving mode
By default, many drivers (eg.
iwlwifi) reduce the adapter's power to save battery. To disable this:sudo iw dev wlan0 set power_save offTo make a setting permanent, add it to
cronor create a servicesystemd.3. Using 5 GHz instead of 2.4 GHz
The 5 GHz band is less crowded and supports faster speeds (
802.11ac/ax). To connect to 5 GHz:
- Make sure your adapter supports 5GHz (check model specifications).
- Enable it in your router settings.
802.11a/n/ac.- Select the network with the suffix
_5Gin the list of available ones.If your adapter supports
802.11ax(Wi-Fi 6), but the speed is lower than expected, update the Linux kernel to version 5.4+. Older versions may not support new standards.8. Alternative Wi-Fi Management Utilities
If standard tools (
NetworkManager) are not satisfactory, try alternatives:
- 📡 wavemon — console signal level monitor with visualization:
sudo apt install wavemon
sudo wavemonSuitable for interference diagnostics and finding the optimal channel.
- 🔧 connman — a lightweight network manager for minimalist systems:
sudo apt install connman
sudo systemctl enable --now connmanControlled via
connmanctl.- 🛠️ wicd - graphical alternative
NetworkManager(obsolete, but still in use):sudo apt install wicd-gtkFor advanced users, the following are useful:
- 🔍 aircrack-ng — a set of tools for network analysis (includes
airodump-ngfor scanning).- 📊 linssid — a graphical scanner of Wi-Fi networks with signal strength display.
⚠️ Attention: Tools like aircrack-ng They are intended for legal network auditing. Unauthorized connection to other people's networks is punishable by law (Article 272 of the Russian Criminal Code - "Unauthorized access to computer information").FAQ: Frequently Asked Questions about Wi-Fi on Linux
🔹 Why can't Linux see my Wi-Fi network, but Windows can?
Most likely, the problem is with the driver. Check:
- Command output
lspci -k | grep -A 3 -i network- if the driver is not loaded, install it (see section 2).- BIOS settings - some laptops (eg. Lenovo or HP) block Wi-Fi for non-Windows systems.
- Adapter operating mode - some chips (eg Realtek RTL8852AE) require kernel 5.15+.
If nothing helps, try a live distribution with a new kernel (for example, Ubuntu 22.04+ or Fedora).
🔹 How to connect to Wi-Fi without a password (open network)?
For open networks use:
nmcli device wifi connect "SSID" --ask # Skip the password promptOr via wpa_supplicant:
wpa_passphrase "SSID" | sudo tee /etc/wpa_supplicant.conf
sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
sudo dhclient wlan0Attention: Open networks are unsafe—traffic is not encrypted. Avoid transmitting sensitive data (passwords, bank details).
🔹 Can I use Wi-Fi and Ethernet at the same time?
Yes, but you'll need to configure routing. By default, Linux uses interface metrics—priority is given to connections with lower metrics (check with the command
ip route).To prioritize Ethernet:
sudo ip route del default
sudo ip route add default via 192.168.1.1 dev eth0 metric 100To permanently customize, edit
/etc/NetworkManager/NetworkManager.confor rulesudev.🔹 How to share Wi-Fi with Linux (create a hotspot)?
The easiest way is through
NetworkManager:nmcli device wifi hotspot ifname wlan0 ssid "MyHotspot" password "12345678"For more flexible customization, use
hostapd+dnsmasq:
- Install packages:
sudo apt install hostapd dnsmasq.- Set up
/etc/hostapd/hostapd.conf(specify SSID, channel, security type).- Run:
sudo systemctl start hostapd.For detailed instructions for your distribution, please refer to the official documentation.
🔹 Why did Wi-Fi stop working after a system update?
A common cause is a kernel update that caused the driver to stop loading. Check:
- Current kernel version:
uname -r.- Driver loading logs:
dmesg | grep -i firmware.- List of loaded modules:
lsmod | grep -i wifi.If the driver is missing, reinstall it (see section 2). For proprietary drivers (e.g.,
bcmwl-kernel) may require rebuilding for the new kernel:sudo dkms autoinstall