Installing the operating system Debian 11, also known by the code name Bullseye, is often the first step for many users seeking stability and security. However, after the first boot, users may encounter an unpleasant reality: the lack of internet access via a wireless network. This is a classic situation when the base system does not contain the proprietary firmware files required for your WiFi adapter to function. This is why the question of how to install WiFi on Debian 11 is one of the most frequently asked questions on specialized forums.
The solution to this problem depends on a number of factors: your network card model, whether you have an Ethernet cable for initial setup, and your level of experience. In some cases, simply connecting the cable and running the graphical package installer is enough; in others, manually compiling drivers from source code is required. It's important to understand that Linux provides flexible tools for working with the network, but they require precise command entry.
In this article, we'll cover all the steps in detail: from hardware identification to setting up a static IP address. We'll also cover how to use the utility. nmcli, which is part of NetworkManager, and we'll also touch on a lower-level tool wpa_supplicant For systems without a graphical interface. Even if you're a beginner, following the instructions will help you get a stable connection.
Identifying network equipment and checking drivers
The first and most important step before doing anything is accurately identifying the model of your wireless adapter. Without this information, finding the right driver will be a matter of guessing. Linux has a powerful utility. lspci for cards connected via the PCI bus (usually internal cards in laptops and desktops), and lsusb For external USB dongles, you need to open a terminal and enter the appropriate command to see a list of connected devices.
After receiving the list of devices, pay attention to the lines containing the words Wireless, Network controller or brand names like Realtek, Intel, Broadcom. Write down the device ID, which usually looks like a pair of hexadecimal numbers, such as 8086:31dcThis code is unique for each chipset model and will help you find a specific firmware package in the Debian repositories. If the system doesn't detect the device at all, it may be disabled in the BIOS or blocked by a physical switch.
To check the radio interface blocking status, use the command rfkill listIt will show the status of all wireless modules. If you see the status Soft blocked: yes, this means a software lock that can be removed with the command rfkill unblock wifi. Status Hard blocked indicates a physical switch or button on the device's body that must be turned to the "on" position.
It often happens that a device is detected, but the driver for it is not loaded. You can check the loaded kernel modules using lsmod | grep -i wifi or lsmod | grep -i netA lack of results doesn't always indicate a problem, as the module may have a name that doesn't contain the word "wifi." The key here is matching the hardware ID with the supported device table for the drivers installed on the system.
Connecting via Ethernet and installing non-free repositories
Since WiFi isn't working yet, you'll need a temporary wired connection to install the necessary drivers. Connect your computer to the router using a cable. EthernetBy default, Debian 11 tries to obtain an IP address automatically via DHCP, so in most cases, the connection is instant. If the internet connection is available, proceed to configuring package sources.
By default, Debian is configured to use only free software, which excludes proprietary firmware files. We need to add repositories. non-free And non-free-firmwareOpen the list source file using a text editor, such as nano, team sudo nano /etc/apt/sources.list. In each line starting with deb, after the word main needs to be finished contrib non-free non-free-firmware.
⚠️ Note: In Debian 12 (Bookworm), the repository structure changed, and firmware was moved to the main repository. However, for Debian 11 (Bullseye), the presence of the line non-free-firmware is a critical requirement for installing proprietary drivers.
After editing the file, save the changes (in nano this is Ctrl+O, Enter, Ctrl+X) and update the package list with the command sudo apt updateNow the system knows where to look for closed drivers. If the command apt update If you are getting connection errors, check your cable or DNS settings. Your ISP may be blocking the default DNS servers.
☑️ Preparing the system for driver installation
Finding and installing WiFi firmware packages
Now that the repositories are connected, you need to find and install the specific firmware package for your card. Package names often correspond to the chipset manufacturer. For example, for Intel cards, the packages firmware-iwlwifi, for Realtek - firmware-realtek, and for Broadcom - firmware-brcm80211If you're not sure which package you need, you can use the package database search.
Use the command apt search firmware to display a list of all available packages related to device microcode. Find your chipset manufacturer in the list. Installation is performed with the command sudo apt install package_name. For example, sudo apt install firmware-iwlwifi firmware-misc-nonfree. Plastic bag firmware-misc-nonfree often contains microcode for less common devices and is useful for "just in case" installation.
| Manufacturer | Chip series | Firmware package | Note |
|---|---|---|---|
| Intel | Centrino, Wi-Fi 6 | firmware-iwlwifi |
Requires module reboot |
| Realtek | RTL8xxx | firmware-realtek |
Often requires dkms |
| Broadcom | BCM43xx | firmware-brcm80211 |
Need bcmwl-kernel-source |
| MediaTek | MT76xx | firmware-misc-nonfree |
Good support in the kernel |
| Qualcomm Atheros | AR9xxx | firmware-atheros |
Stable work |
After installing the packages, you must either reboot the computer or unload and reload the kernel module. For Intel, for example, this is done with the command sudo modprobe -r iwlwifi followed by sudo modprobe iwlwifiIf after these steps a list of available networks appears in the upper right corner of the screen (in GNOME or KDE), the driver has installed successfully.
What to do if the package is not found?
If apt search returns no results, your adapter may be too new and require drivers from backports or compilation from GitHub. Add the bullseye-backports repository to your sources.list and try installing the package from there.
Setting up WiFi via NetworkManager (nmcli)
In Debian 11, the default is NetworkManager for managing network connections. It's a powerful tool that has both a graphical interface and a command-line utility. nmcliUsing the command line is preferred on servers or when a graphical shell is not available. First, check the device status with the command nmcli device statusYour wireless device should be in the status disconnected or unavailable, but not missing.
To connect to the network, use the scan command nmcli device wifi listto see available access points. Find your network name (SSID) in the list. Connect with the command nmcli device wifi connect "Network_Name" password "Your_Password"Please note that quotation marks are required if the network name or password contains special characters.
If the connection is successful, NetworkManager will create a connection profile that will automatically activate whenever the network is within range. You can view saved connections with the command nmcli connection showTo delete an unnecessary profile, use nmcli connection delete "Profile_Name"This is especially useful if you've changed your router password and the system is trying to connect with the old password.
⚠️ Caution: When using nmcli When using scripts or remote control, do not pass cleartext passwords in the command history. Use environment variables or enter the password interactively, if possible.
Manual configuration via wpa_supplicant and interfaces
In some cases, especially on minimalistic Debian builds without a graphical interface, manual configuration may be required via wpa_supplicantThis method provides greater control over the authentication process. First, you need to create a configuration file. It's best to generate a password hash to avoid storing it in plaintext, although this is less critical for WPA2-PSK than for corporate networks.
Create or edit a file /etc/wpa_supplicant/wpa_supplicant.confAdd a network block with your parameters. The file structure must be precise, otherwise the daemon will not start. Below is an example of a correct configuration for a home network.
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdevupdate_config=1
network={
ssid="Your_Network_Name"
psk="Your_Password"
key_mgmt=WPA-PSK
}
After setting up the file, you need to configure the network interface in the file /etc/network/interfaces. Add a line iface wlan0 inet dhcp to obtain an IP address automatically, or specify a static address if required by your network infrastructure. To start the process, use the command sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf, Where -B means running in the background.
Solving common connection problems and errors
Even with the drivers installed correctly, connection errors may still occur. A common problem is a driver conflict. For example, an open driver nouveau NVIDIA video cards sometimes conflict with WiFi, but most often the problem lies in the module rtw (Realtek), which may conflict with its own proprietary module. In such cases, you need to create a blacklist file, for example /etc/modprobe.d/blacklist-rtw.conf, and write it there blacklist rtw_8822ce (or the name of your module).
Another common error is incorrect time. WPA2/WPA3 encryption protocols are sensitive to time desynchronization. If the computer's date is incorrect, authentication with the router will fail. Check the time with the command date and sync it via timedatectlIt's also worth checking your power saving settings. Some adapters go into sleep mode and don't wake up, which leads to connection interruptions.
To disable power saving, create a configuration file /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf and set the value wifi.powersave V 2 (which means disabling power saving mode). This often solves the problem of "flickering" WiFi on Debian laptops.
Why doesn't Debian detect the WiFi adapter after updating the kernel?
When updating the Linux kernel, the DKMS (Dynamic Kernel Module Support) modules should be rebuilt automatically. If this doesn't happen, the WiFi driver may stop working. Run the command sudo dpkg-reconfigure dkms or reinstall the package linux-headers for your current kernel version to initiate module compilation again.
How to set up a static IP address in Debian 11?
To set up a static IP, edit /etc/network/interfaces. Add the following lines: iface eth0 inet static, then specify address, netmask, gateway And dns-nameserversDon't forget to restart the network with the command sudo systemctl restart networking or reconnect the cable.
Is it possible to use WiFi in Hotspot mode?
Yes, Debian 11 allows you to create an access point. In the GNOME graphical interface, this is done through the network settings. In the console, you can use nmcli with parameter type wifi mode apHowever, not all adapters support AP mode and client mode simultaneously.
Where can I find WiFi connection error logs?
The main system event log in Debian is /var/log/syslogTo filter network-related messages, use the command grep -i wifi /var/log/syslog or journalctl -u NetworkManager to view network management service logs in real time.