Connecting a Wi-Fi adapter to Ubuntu is often the first major challenge for Linux newbies. Unlike Windows, where drivers are installed automatically, in Ubuntu the process may require manual steps—especially if you have a non-standard adapter. TP-Link, ASUS or RealtekEven experienced users sometimes encounter problems: the system doesn't detect the device, the network constantly drops, or the speed leaves much to be desired.
In this article you will find step-by-step instructions For various scenarios: from basic setup of the built-in adapter to manual installation of drivers for external USB devices. We'll cover how to check hardware compatibility, where to download the latest drivers, and what to do if NetworkManager refuses to connect to the network. And for those who prefer the terminal, here's commands for diagnostics and troubleshooting.
1. Checking Wi-Fi adapter compatibility with Ubuntu
Before purchasing or connecting an adapter, make sure it is supported by the Linux kernel. Many modern chips (for example, Intel AX200 or Qualcomm Atheros) work "out of the box", but with Realtek RTL88x2BU or Mediatek MT7921 problems may arise.
You can check compatibility on the adapter manufacturer's official website or in the Linux kernel database. Please note the Ubuntu version: drivers for Ubuntu 22.04 LTS may not be suitable for 24.04 Due to an updated kernel. If you're using a laptop, check the chipset model using the command:
lspci -knn | grep -iA3 net
Suitable for USB adapters:
lsusb
Key signs of incompatibility:
- 🔌 The adapter is detected as an "unknown device" (
lsusbshowsID 0bda:c820 Realtek Semiconductor Corp., but without the model name). - 📡 In the list of networks (
nmcli dev wifi list) only neighboring access points are displayed, but connection is not possible. - ⚡ The system freezes when trying to activate Wi-Fi via
NetworkManager.
⚠️ Attention: Manufacturers often change chip revisions in the same adapter model. For example, TP-Link Archer T4U can be supplied with chips Realtek RTL8812AU (supported) or RTL8852AE (Requires manual driver installation). Check the chipset version before purchasing!
2. Basic Wi-Fi setup via NetworkManager
If your adapter is recognized by the system, you can connect to the network through the graphical interface or terminal. Let's look at both options.
Method 1: Graphical User Interface (GUI)
This is the easiest method for beginners:
- Click on the network icon in the upper right corner of the panel (next to the clock).
- Select your network from the list.
- Enter your password and click Connect.
If there is no network icon or it is crossed out, check whether Wi-Fi is turned on by the hardware switch (on some laptops - the key Fn + F2 or a separate toggle switch).
Method 2: Terminal (for advanced users)
Use nmcli — a utility for network management:
# View available networksnmcli dev wifi list
Connect to the network (replace "SSID" and "password")
nmcli dev wifi connect "SSID" password "password"
To save your settings and connect automatically:
nmcli connection modify "SSID" connection.autoconnect yes
Ping to the router (replace 192.168.1.1 with your router's IP)|ping 192.168.1.1
Check External IP|curl ifconfig.me
Connection speed|nload wlan0 (install via sudo apt install nload)
-->
If the connection fails, check the service status. NetworkManager:
systemctl status NetworkManager
⚠️ Attention: In Ubuntu 24.04, the default may beNetPlaninstead ofNetworkManager. If the teamsnmclidon't work, check the configuration in/etc/netplan/and apply the changes with the commandsudo netplan apply.
3. Installing drivers for unrecognized adapters
If the system doesn't detect the adapter, the driver is most likely missing. Let's consider two scenarios: installing from the Ubuntu repositories and manually compiling the driver from source.
Option 1: Drivers from repositories (recommended)
For popular chips (eg. Realtek RTL8188EU or Broadcom BCM43xx) The drivers are already in the repositories. Install them like this:
# Updating the package listsudo apt update
Search for available drivers (replace "realtek" with your manufacturer)
apt search rtl88x2bu | grep driver
Installation (example for RTL88x2BU)
sudo apt install rtl88x2bu-dkms
After installation, reboot the system or load the kernel module manually:
sudo modprobe 88x2bu
Option 2: Manually compiling the driver
For new chips (eg. Realtek RTL8852BE or Mediatek MT7922) You may need to download the driver from GitHub. Here's how:
- Find the repository with the driver for your model (example: rtl88x2bu).
- Install dependencies for compilation:
sudo apt install git dkms build-essential
- Clone the repository and install the driver:
git clone https://github.com/cilynx/rtl88x2bu.gitcd rtl88x2bu
make
sudo make install
sudo modprobe 88x2bu
What should I do if I get a "missing headers" error during compilation?
This means that the kernel headers are not installed. Use the command:
sudo apt install linux-headers-$(uname -r)
Then try compiling again.
Popular driver repositories:
- 🔹 Realtek RTL88x2BU/RTL88x2CU: cilynx/rtl88x2bu
- 🔹 Realtek RTL8188EU/RTL8192EU: lwfinger/rtl8188eu
- 🔹 Mediatek MT7610U/MT7612U: ullbeking/mt7610u
4. Solving common problems
Even after installing the drivers, errors may still occur. Let's look at typical cases and how to resolve them.
| Problem | Possible cause | Solution |
|---|---|---|
| The adapter is detected, but no networks are found. | Regional restrictions on Wi-Fi channels | Set the correct region: sudo iw reg set RU (replace RU with your country) |
| Constant connection breaks | Adapter power saving | Disable: sudo sed -i 's/wifi.powersave = 3/wifi.powersave = 2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf |
| Low speed (1-5 Mbps) | Legacy 802.11n standard or 20 MHz channel width | Force the standard 802.11ac in the router settings or use iwconfig wlan0 rate 54M |
| "Authentication required" error when connecting | Incorrect password or security type (WPA3 vs WPA2) | Check your router settings. WPA3 may require an update. wpa_supplicant |
A critical feature of Ubuntu 24.04: this version disables support for legacy security protocols (WEP, TKIP) by default. If your router uses these standards, update its firmware or change the encryption type to WPA2-AES.
Diagnostics via the system log
If the problem persists, check the kernel logs:
dmesg | grep -i wifi
journalctl -u NetworkManager --no-pager | grep -i error
Please note the lines with firmware — they indicate the absence of firmware files. For example, for chips Intel You may need to install a package firmware-iwlwifi.
5. Optimize Wi-Fi speed and stability
Even if the adapter is working, the speed may be lower than expected. Here's how to improve it:
- 📶 Channel selection: Use the utility
iwlist wlan0 scanning | grep Frequencyto find the least loaded channel on your router. - 🔄 Opening hours: Set it in your router settings
802.11ac(5 GHz) instead802.11n(2.4 GHz), if your adapter supports it. - 🔋 Energy saving: Disable automatic Wi-Fi shutdown when idle:
sudo iw dev wlan0 set power_save off. - 🛡️ Safety: Use
WPA2-AESinstead ofWPA2-TKIP- this speeds up packet processing.
To test the speed use iperf3 (install on PC and router):
# On the router (server):iperf3 -s
On Ubuntu (client):
iperf3 -c 192.168.1.1 -t 30
6. Alternative connection methods
If standard methods don't work, try alternative solutions.
Method 1: Using wpa_supplicant manually
This is a universal method that works even without NetworkManager:
- Create a configuration file:
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
- Add network settings (example for WPA2):
network={ssid="Your_network"
psk="Your_password"
key_mgmt=WPA-PSK
}
- Connect:
sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
sudo dhclient wlan0
Method 2: USB Tethering with Android
If your Wi-Fi adapter isn't working and you need internet urgently, use your smartphone:
- Connect your phone via USB.
- Turn on USB tethering in Android settings.
- On Ubuntu, check the new network device:
ip a | grep usb
- Configure IP acquisition via DHCP:
sudo dhclient usb0
Method 3: Virtual Adapter (for advanced users)
If you have a working Ethernet connection, you can share Wi-Fi from your PC:
# Installing utilitiessudo apt install hostapd dnsmasq
Configuring hostapd (simplified example)
sudo nano /etc/hostapd/hostapd.conf
Add:
interface=wlan0driver=nl80211
ssid=MyUbuntuHotspot
hw_mode=g
channel=6
wpa=2
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
7. Updating the kernel to support new adapters
If your adapter is less than a year old (for example, Intel BE200 or Qualcomm FastConnect 7800), its support may not be available in the current Ubuntu kernel. The solution is to update the kernel to the latest version.
The safest way is to use mainline-cores:
# Installing the kernel update utilitysudo apt install mainline
View available versions
sudo mainline --list
Installing the latest stable version
sudo mainline --install-latest
After rebooting, check the kernel version:
uname -r
⚠️ Attention: Updating the kernel may break proprietary drivers (for example, for NVIDIA graphics cards). Before updating, back up important data or use Timeshift to create a system snapshot.
If Wi-Fi stops working after updating the kernel, revert to the older version:
sudo apt install linux-image-5.15.0-XX-generic # replace with your versionsudo update-grub
sudo reboot
FAQ: Frequently Asked Questions about Wi-Fi in Ubuntu
My adapter is detected but won't connect to a network with a hidden SSID. What should I do?
To connect to a hidden network in NetworkManager:
- Open Network Settings → Wi-Fi → Connect to a hidden network.
- Enter the SSID and password.
- In the terminal, use:
nmcli dev wifi connect "SSID" password "password" hidden yes.
If this doesn't help, check if your adapter supports hidden networks (some chips Realtek have problems with this).
How do I make Wi-Fi connect automatically on boot?
Enable auto-connection:
nmcli connection modify "SSID" connection.autoconnect yes
If used NetPlan, edit the file /etc/netplan/01-netcfg.yaml:
network:version: 2
renderer: NetworkManager
wifis:
wlan0:
access-points:
"Your_network":
password: "Your_password"
dhcp4: true
Apply changes:
sudo netplan apply
Ubuntu doesn't see the 5 GHz network, only the 2.4 GHz one. What's wrong?
This is a common issue with older adapters or drivers. Possible causes:
- The adapter does not physically support 5 GHz (check specifications).
- The driver limits the range (eg. rtl8192cu by default it only works on 2.4 GHz).
- Regional restrictions (in some countries 5 GHz is prohibited for general use).
Solution:
- Update your driver to the latest version.
- Force 5GHz support:
sudo iw reg set BO # BO — Bulgaria, where the full 5 GHz band is allowed
Or edit the configuration hostapd (if using an access point):
hw_mode=a
channel=36 # Channel in the 5 GHz range
Wi-Fi stopped working after updating Ubuntu. How do I roll back?
If the problem occurred after a system or kernel update:
- Check which kernel was used previously:
cat /boot/grub/grub.cfg | grep menuentry
- Boot from the old kernel via GRUB (hold
Shiftwhen loading). - Remove the problematic kernel:
sudo apt remove linux-image-6.5.0-XX-generic
- Update GRUB:
sudo update-grub
If a package update (not a kernel update) is to blame, try rolling back NetworkManager:
sudo apt install --reinstall network-manager
Is it possible to use Windows drivers for a Wi-Fi adapter in Ubuntu?
Technically yes, but it is a complex and unstable process. This is done using ndiswrapper, But:
- Works only with 32-bit drivers (even on 64-bit Ubuntu).
- Does not support modern chips (eg. Wi-Fi 6/6E).
- May cause conflicts with native drivers.
Instructions (if you decide to do it):
sudo apt install ndiswrapper-common ndiswrapper-utils-1.9sudo ndiswrapper -i path/to/driver.inf
sudo ndiswrapper -m
sudo modprobe ndiswrapper
It is much more reliable to find a Linux driver or buy a compatible adapter (for example, on a chip) Intel AX200 or Atheros AR9485).