Connecting to Wi-Fi on a laptop with Linux often raises questions among beginners - especially if the system does not recognize the adapter out of the box or requires manual configuration. Unlike Windows or macOSWhere drivers are usually installed automatically, in Linux the process can vary depending on the distribution, laptop model, and even the kernel version. But don't panic: in 90% of cases, the problem can be resolved in 5-10 minutes using standard tools.
This article will help you figure out how to connect to a wireless network on any distribution - from Ubuntu And Mint to Arch Linux And FedoraWe will consider:
- 🔍 How to check if the system recognizes your Wi-Fi adapter
- 📡 Connection methods via graphical interface and terminal
- 🔧 What to do if Wi-Fi isn't working due to missing drivers
- 🛠️ Diagnosing common errors (e.g., "device not controlled")
Even if you have never worked with Linux terminalThe instructions below are written as simply as possible, with explanations for each step. And for experienced users, we've added advanced setup methods (for example, via wpa_supplicant or nmcli).
1. Checking the presence of a Wi-Fi adapter in the system
Before setting up the connection, make sure Linux can actually see your wireless adapter. To do this, run the following command in the terminal:
lspci -knn | grep -iA3 net
Or for USB adapters:
lsusb
In the output, look for lines mentioning Network Controller or Wireless. For example:
- 📌
Qualcomm Atheros QCA9377 802.11ac Wireless— a popular adapter in laptops Lenovo And HP. - 📌
Intel Corporation Wireless-AC 9560— often found in devices Dell And Asus. - 📌
Realtek RTL8821CE— a budget chipset that may require manual installation of drivers.
If there is no mention of a wireless adapter in the output, the problem may be:
- 🔌 The adapter is disabled at the BIOS level (check the settings
Wireless LAN Support). - 🚫 Hardware Wi-Fi switch on the laptop case (relevant for older models) Sony Vaio or Acer).
- 🔧 Lack of drivers (more on this in the next section).
⚠️ Attention: On some laptops (eg. Lenovo ThinkPad series T480 or Dell XPS 13) The Wi-Fi adapter can be disabled using a key combinationFn + F2orFn + PrtScCheck if the airplane indicator (airplane mode) is on.
2. Connecting to Wi-Fi via the graphical interface
If the adapter is recognized, the easiest way to connect is to use the standard network manager. In most distributions, this NetworkManager (an icon in the form of two arrows or a Wi-Fi icon in the upper right corner of the screen).
Instructions for Ubuntu, Linux Mint, Fedora and derivatives:
- Click on the network icon in the taskbar.
- Select the desired network from the list.
- Enter your password and click
Connect.
If there is no network icon:
- 🔄 Restart the NetworkManager service:
sudo systemctl restart NetworkManager - 🖥️ Make sure the package is installed
network-manager-gnome(for GNOME) orplasma-nm(for KDE).
| Distribution | Command to install NetworkManager (if missing) |
|---|---|
| Ubuntu/Debian | sudo apt install network-manager network-manager-gnome |
| Fedora/RHEL | sudo dnf install NetworkManager NetworkManager-wifi |
| Arch Linux | sudo pacman -S networkmanager network-manager-applet |
| OpenSUSE | sudo zypper install NetworkManager NetworkManager-applet |
⚠️ Attention: In some minimal Linux builds (eg. Ubuntu Server or Arch Linux without DE) NetworkManager may be missing. In this case, the connection is configured viawpa_supplicantornetctl— read about this in the section about the terminal.
3. Connecting to Wi-Fi via a terminal (for advanced users)
If the graphical interface is not available or you prefer to work in the console, you can connect to Wi-Fi using utilities nmcli (for NetworkManager) or wpa_supplicant.
Method 1: via nmcli
- View the list of available networks:
nmcli dev wifi list - Connect to the network (replace
SSIDAndpassword):nmcli dev wifi connect "SSID" password "password"
Method 2: via wpa_supplicant (if NetworkManager is not installed):
- Generate a network config:
wpa_passphrase "SSID" "password" | sudo tee /etc/wpa_supplicant.conf - Connect to the network:
sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf(replace
wlan0to your interface found by the commandip a) - Get an IP address:
sudo dhclient wlan0
How to find out the name of the wireless interface?
Run the command ip a or iwconfigLook for the interface named wlan0, wlp3s0 etc. (where wl (means wireless).
If the Internet does not work after connecting, check:
- 🌐 DNS settings (sometimes the command helps
sudo systemd-resolve --flush-caches). - 🔒 Firewall (
sudo ufw disable- temporarily disable it to check). - 📡 Router signal (command)
iwconfig wlan0will show the signal levelSignal level).
4. Installing drivers for the Wi-Fi adapter
If the system doesn't detect the adapter or the connection keeps dropping, the problem is most likely with the drivers. In Linux, there are two types of Wi-Fi drivers:
- 🔄 Open source — are included in the kernel, but may not support new chipsets.
- 🔒 Closed (proprietary) - are provided by manufacturers (for example, Broadcom or Realtek).
How to install the driver manually:
Step 1: Find out your chipset model:
lspci -k | grep -A 3 -i network
Look for the line in the output Kernel driver in use. For example:
- 📌
iwlwifi— driver for adapters Intel. - 📌
rtl8xxxu— driver for chipsets Realtek (For example, RTL8188EU). - 📌
b43orwl— drivers for chipsets Broadcom.
Step 2: Install missing drivers:
| Chipset manufacturer | Command to install the driver | Notes |
|---|---|---|
| Intel | sudo apt install firmware-iwlwifi (Debian/Ubuntu) |
Usually works out of the box, but may require a firmware update. |
| Realtek (RTL8188/RTL8192/RTL8723) | sudo apt install rtl8188eus-dkms or rtl8821ce-dkms |
For new chipsets (eg. RTL8852AE) may require compilation from source. |
| Broadcom (BCM43xx) | sudo apt install firmware-b43-installer or broadcom-sta-dkms |
Closed driver wl conflicts with open b43 - delete one of them. |
| Mediatek (MT76xx) | sudo apt install firmware-misc-nonfree |
For chipsets MT7610U or MT7612U. |
Step 3. Reload the kernel module:
sudo modprobe -r [driver_name] && sudo modprobe [driver_name]
For example, for Realtek:
sudo modprobe -r rtl8xxxu && sudo modprobe rtl8xxxu
⚠️ Attention: After installing closed drivers (for example,broadcom-sta-dkms) You may need to disable the built-in open source driver. To do this, add it to the blacklist:echo "blacklist b43" | sudo tee /etc/modprobe.d/blacklist-b43.confThen reboot the system.
Find out the chipset model|Install the firmware package|Reload the kernel module|Check for interface availability wlan0 V ip a|Reboot the system (if necessary)
-->
5. Solving Common Wi-Fi Problems in Linux
Even after installing the drivers, the connection may be unstable. Let's look at the most common errors and how to fix them.
Problem 1: "Device not managed"
The error occurs when NetworkManager doesn't control the wireless interface. Solution:
sudo rfkill unblock wifi
sudo systemctl restart NetworkManager
Problem 2: Constant connection breaks
Reasons:
- 📶 Weak router signal (check the distance or change the channel in the router settings).
- ⚡ Adapter power saving (disable it):
sudo iwconfig wlan0 power off - 🔄 Driver conflict (uninstall old versions as described above).
Problem 3: Unable to connect to a hidden network (hidden SSID)
To connect to a hidden network via nmcli use the flag hidden yes:
nmcli dev wifi connect "SSID" password "password" hidden yes
Problem 4: Wi-Fi works, but there is no internet access
Check:
- 🔗 IP settings (command
ip addr show wlan0- must be an address in the range of your network, for example192.168.1.x). - 🌍 DNS (try manually entering Google's DNS:
sudo nmcli con mod "SSID" ipv4.dns "8.8.8.8 8.8.4.4"). - 🔥 Firewall (
sudo ufw status- if it is on, temporarily turn it off).
6. Alternative ways to connect to the Internet
If you can't set up Wi-Fi, temporarily connect to the internet using another method to download drivers or update the system:
Method 1: Via Ethernet (cable)
Simply connect your laptop to the router with a cable—most distributions will automatically receive settings via DHCP.
Method 2: Via USB modem (3G/4G)
- 📱 Connect a USB modem (for example, from Megafon or Beeline).
- 🔄 Install the package
usb-modeswitch:sudo apt install usb-modeswitch - 🌐 Reboot the system - the modem should be detected as a network device.
Method 3: Via smartphone (USB-thering)
- Connect your phone to your laptop via USB.
- Turn on the mode
USB modemin the phone settings. - On Linux install the package
android-tools-adb(optional, but may help).
Method 4: Via another laptop (Wi-Fi Direct or Hotspot)
- 💻 On the second laptop (with Windows or macOS) turn on the mode
Mobile hotspot. - 🔗 Connect to this network from a Linux laptop and download the drivers.
7. Optimize Wi-Fi for stable operation
If your Wi-Fi connects but is slow or intermittent, try the following settings:
1. Select a channel with minimal interference
Utility iwlist will show the channel load:
sudo iwlist wlan0 scanning | grep Frequency
In the router settings, select the least loaded channel (for example, 1, 6 or 11 for 2.4 GHz).
2. Disable adapter power saving
Create a config to disable power saving mode:
sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
Add the line:
[connection]
wifi.powersave = 2
Then restart NetworkManager:
sudo systemctl restart NetworkManager
3. Updating the Linux kernel
New kernel versions often include improved support for Wi-Fi adapters. Update your kernel:
- 🐧 On Ubuntu/Debian:
sudo apt install linux-generic - 🎯 On Arch Linux:
sudo pacman -S linux linux-firmware
4. Using 5 GHz instead of 2.4 GHz
If your adapter and router support 5 GHz, connect to this network—it's less crowded and offers faster speeds. To check supported frequencies:
iw list | grep -A 10 "Supported frequencies"
8. Checking connection security
After setting up Wi-Fi, make sure your connection is secure:
1. Check the encryption type
Modern networks must use WPA3 or WPA2You can find out the encryption type of your network using the command:
nmcli -f ACTIVE,SECURITY dev wifi list
If your router is still using WEP or WPA, change the settings to WPA2-PSK (or WPA3, if supported).
2. Disable automatic connection to open networks
To prevent Linux from automatically connecting to unsecured networks (such as those in cafes or airports), edit the NetworkManager settings:
sudo nano /etc/NetworkManager/NetworkManager.conf
Add the line:
[device]
wifi.scan-rand-mac-address=no
3. Set up a firewall
Make sure that ufw (or another firewall) does not block outgoing connections:
sudo ufw allow out on wlan0
4. Check the MAC address
Some routers restrict access based on MAC addresses. Find out your MAC address:
ip link show wlan0 | grep ether
And add it to the list of allowed devices in the router settings.
⚠️ Attention: If you are connecting to public Wi-Fi (for example, in a hotel or shopping mall), use VPN to encrypt traffic. You can install a VPN on Linux usingOpenVPNorWireGuard.
FAQ: Frequently Asked Questions about Wi-Fi in Linux
🔹 Why doesn't Linux detect my Wi-Fi adapter even though it works in Windows?
Most likely your adapter requires closed driver, which is not included in the kernel by default. Check the chipset model (as described in Section 4) and install the appropriate package (e.g. broadcom-sta-dkms For Broadcom or rtl8821ce-dkms For Realtek).
If the driver is installed but the adapter is not detected, try updating the kernel or adding it to the blacklist (as in the example with b43).
🔹 How do I connect to Wi-Fi without a graphical interface (for example, on a server)?
Use wpa_supplicant:
- Create a config:
wpa_passphrase "SSID" "password" | sudo tee /etc/wpa_supplicant.conf - Connect:
sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf - Get IP:
sudo dhclient wlan0
For a permanent connection, add wpa_supplicant to startup via systemd.
🔹 Can I use Wi-Fi 6 (802.11ax) on Linux?
Yes, but with some reservations:
- 🔄 Adapters Intel AX200/AX210 supported by the kernel starting from version
5.4+. - 🔧 For Realtek RTL8852AE or Mediatek MT7921 Drivers from repositories or building from source may be required.
- 📡 The router must also support
Wi-Fi 6(check your settings for the mode802.11ax).
To check your current connection standard, run:
iwconfig wlan0 | grep -i "bit rate"
For Wi-Fi 6 the speed must exceed 866 Mbit/s.
🔹 How to reset all Wi-Fi settings in Linux?
To delete all saved networks and restore default settings:
- Remove all connections:
nmcli con delete id "SSID"(repeat for each network).
- Reset NetworkManager:
sudo systemctl restart NetworkManager - Delete the configs
wpa_supplicant(if used):sudo rm /etc/wpa_supplicant.conf
After this, all networks will be forgotten, and you will be able to set up the connection again.
🔹 Why is Wi-Fi speed slower on Linux than on Windows?
Possible causes and solutions:
- 🔧 Driver: Windows often uses closed drivers with optimizations. On Linux, install the latest driver version (for example, for Intel update
iwlwifi). - 📡 Adapter operating mode: Check that the adapter is working in mode
802.11acor802.11ax(teamiw list). - ⚡ Energy saving: Disable it as described in section 7.
- 🌐 Router settings: Try changing the channel, channel width (for example, to
40 MHz) or encryption standard (withWPA3onWPA2).