Wi-Fi on Debian: A Complete Guide to Setting Up a Wireless Network

Wireless internet connection in Debian often becomes a stumbling block for beginners - especially when it comes to a fresh installation of the system or non-standard equipment. Unlike Ubuntu or Mint, where many drivers are installed automatically, Debian requires a more careful approach: there's no "magic button," but there is flexibility and control. This article will help you figure out how to turn on Wi-Fi on Debian 12 (and older), even if your adapter is not initially recognized by the system.

We'll cover every step, from checking hardware compatibility to manual setup. wpa_supplicantWe will pay special attention to typical errors (for example, Device not ready or lack of network in nmcli) and how to eliminate them. If you use Debian on a laptop with Broadcom, Intel or Realtek chipsets - here you will find solutions for your case.

A word of warning: the process may vary depending on your kernel version and Wi-Fi adapter model. If you still have questions after reading this, check the command output. lspci -knn | grep Net -A3 (for PCI devices) or lsusb (for USB adapters) and check the details for your equipment.

1. Check hardware compatibility

Before setting up Wi-Fi, make sure your adapter is supported. Debian. Most modern chipsets (Intel AX200, Qualcomm Atheros, some Realtek RTL88x2) work "out of the box", but there are exceptions - for example, adapters Broadcom often require the installation of proprietary drivers.

To identify your Wi-Fi module, run the following 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:

03:00.0 Network controller [0280]: Intel Corporation Wi-Fi 6 AX200 [8086:2723] (rev 1a)

Subsystem: Intel Corporation Wi-Fi 6 AX200NGW [8086:0024]

Kernel driver in use: iwlwifi

Please note:

  • 🔹 Vendor ID (For example, 8086 For Intel) - will help you find the driver.
  • 🔹 Kernel driver in use - if this is empty or specified none, the driver is not loaded.
  • 🔹 Chipset model (For example, AX200, RTL8188EE) is critical for finding solutions.

If there's no mention of Wi-Fi in the output, the adapter may be disabled in the BIOS/UEFI or physically (some laptops have a hardware switch). Also, check whether the module is blocked by the power management system:

rfkill list

If the response contains a string Soft blocked: yes or Hard blocked: yes, unlock the adapter:

sudo rfkill unblock wifi
📊 What Wi-Fi adapter does your device use?
Intel
Broadcom
Realtek
Qualcomm Atheros
Don't know
Another

2. Installing the required packages

By default Debian Comes with a minimal set of tools for working with Wi-Fi. To manage networks via a graphical interface or terminal, install:

sudo apt update

sudo apt install network-manager wireless-tools wpasupplicant firmware-iwlwifi

Let's look at what each package is responsible for:

Plastic bag Purpose Do I need to install it?
network-manager Graphical and console network manager (NM) Yes, if you want to use it nmtui or an applet in the taskbar
wireless-tools Wi-Fi management utilities (eg. iwconfig) Optional, but useful for diagnostics
wpasupplicant Utility for connecting to secure networks (WPA/WPA2) Yes, definitely.
firmware-iwlwifi Proprietary firmware for adapters Intel For only Intel-chipsets (for example, AX200, 9260)

For adapters Broadcom additional packages will be required:

sudo apt install firmware-b43-installer b43-fwcutter

And for Realtek RTL88x2 (For example, RTL8822CE) manual compilation of the driver may be required GitHub.

⚠️ Attention: If after installing the packages Wi-Fi still doesn't work, check if the module is blocking it ideapad-laptop (relevant for laptops) Lenovo IdeaPad). Disable it with the command sudo modprobe -r ideapad-laptop and reboot.

3. Connecting to Wi-Fi via NetworkManager

The easiest way to connect to the network is to use NetworkManager (NM). It supports both a graphical interface and console utilities. nmcli And nmtui.

If you use GNOME, KDE or XFCE, a network applet should appear in the taskbar. Click it, select your network, and enter the password. If the applet isn't there, launch it manually:

nm-applet &

To control via terminal use nmtui:

sudo nmtui

In the menu, select Activate a connection, then find your network in the list. If the network is not there, click Scan.

Alternatively, you can use nmcli:

# View available networks

nmcli dev wifi list

Connect to the network (replace SSID and PASSWORD)

nmcli dev wifi connect "Network_Name" password "password"

The Wi-Fi adapter is not blocked (rfkill list)

Packages installed network-manager And wpasupplicant

The network is visible in the output nmcli dev wifi list

The network password has been copied to the clipboard (avoid typos)

-->

If the connection fails, check the NetworkManager status:

sudo systemctl status NetworkManager

If the service is not active, start it:

sudo systemctl enable --now NetworkManager

4. Manual connection using wpa_supplicant

If NetworkManager doesn't work (for example, in a minimal installation without a graphical interface), you can connect via wpa_supplicantThis method is universal and works even on server editions. Debian.

First, create a configuration file for your network:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Add the following template to it (replace Network_name And password):

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

update_config=1

country=RU # Replace with your country (for example, UA, BY, KZ)

network={

ssid="Network_Name"

psk="password"

key_mgmt=WPA-PSK

}

Save the file (Ctrl+O, then Ctrl+X) and connect to the network:

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

sudo dhclient wlan0

Here:

  • 🔹 -B - run in the background.
  • 🔹 -i wlan0 - Wi-Fi interface (check yours with ip a).
  • 🔹 dhclient — obtaining an IP address via DHCP.

To make the connection automatically at boot, add to /etc/network/interfaces:

auto wlan0

iface wlan0 inet dhcp

wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

⚠️ Attention: If your network uses 802.1X (corporate authentication), in the block network={} need to add parameters eap=PEAP, identity="login" And password="password". The configuration depends on the type of authentication server (for example, FreeRADIUS).

5. Diagnostics and troubleshooting

If Wi-Fi isn't working, start by checking the following:

1. The adapter is detected but does not connect:

  • 🔹 Check if the Wi-Fi indicator on your laptop is on (if applicable).
  • 🔹 Complete dmesg | grep firmware - if there are errors loading the firmware, install the corresponding package (firmware-*).
  • 🔹 For Realtek try disabling power saving: sudo iwconfig wlan0 power off.

2. The network is not visible in the list:

  • 🔹 Make sure your router isn't hiding its SSID. To connect to a hidden network, wpa_supplicant.conf add scan_ssid=1.
  • 🔹 Check whether your adapter supports your network frequency (2.4 GHz or 5 GHz). For example, older adapters may not support 5 GHz networks.
  • 🔹 If you use USB adapter, try a different port (some USB 3.0 ports conflict with Wi-Fi).

3. Error "Device not ready" in nmcli:

This means that NetworkManager cannot control the interface. Solutions:

  • 🔹 Restart NM: sudo systemctl restart NetworkManager.
  • 🔹 Remove conflicting configurations: sudo rm /etc/network/interfaces.d/*.
  • 🔹 Check if the interface is managed by another service (e.g. systemd-networkd). Turn it off: sudo systemctl disable systemd-networkd.

For in-depth diagnostics, use:

# View NetworkManager logs

journalctl -u NetworkManager -b

Checking the interface status

ip link show wlan0

Scanning networks manually

sudo iwlist wlan0 scan | grep ESSID

What to do if Wi-Fi connects but the internet doesn't work?

1. Check if you have received an IP address: ip a show wlan0If the address is of the type 169.254.x.x, DHCP didn't work - run sudo dhclient -r wlan0, then sudo dhclient wlan0>.

2. Make sure the gateway is registered: ip routeIf there is no default route, add one: sudo ip route add default via 192.168.1.1 (replace IP with your router's address).

3. Check DNS: cat /etc/resolv.confIf the file is empty, add Google DNS: echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf.

4. Disable IPv6 if it conflicts: in /etc/sysctl.conf add the lines:

net.ipv6.conf.all.disable_ipv6=1

net.ipv6.conf.default.disable_ipv6=1

Then do sudo sysctl -p.

6. Optimization and additional settings

After a successful connection, you can improve the stability and speed of Wi-Fi:

1. Selecting a channel and standard:

If the router supports 802.11ac (Wi-Fi 5) or 802.11ax (Wi-Fi 6), make sure the adapter is working optimally. Check the current settings:

iwconfig wlan0

To force the standard to be enabled 802.11ac (if supported):

sudo iw dev wlan0 set type managed

sudo iw dev wlan0 set channel 36 80 # Channel 36, width 80 MHz

2. Power saving settings:

By default Debian may aggressively save power, leading to connection drops. Disable power saving for Wi-Fi:

sudo iw dev wlan0 set power_save off

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

iw dev wlan0 set power_save off

3. Network priority:

If you have multiple networks, you can set the priority in wpa_supplicant.conf using the parameter priority:

network={

ssid="Work"

psk="password"

priority=10 # The higher the value, the higher the priority

}

4. Signal quality monitoring:

To monitor signal strength and speed in real time, install iw and use:

watch -n 1 "iw dev wlan0 link"

The output will contain:

  • 🔹 signal — signal level (for example, -50 dBm - good, -80 dBm - weak).
  • 🔹 tx bitrate — current transfer rate.
  • 🔹 connected time — connection time.

7. Connecting to hidden networks and enterprises

Hidden networks (with SSID broadcast disabled) and corporate networks (with 802.1X) require special configuration.

Hidden network:

IN wpa_supplicant.conf add parameter scan_ssid=1:

network={

ssid="Hidden_network"

scan_ssid=1

psk="password"

}

To connect via nmcli:

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

Corporate network (WPA-Enterprise):

Example configuration for a network with PEAP/MSCHAPv2 (for example, in universities or offices):

network={

ssid="Corp_network"

key_mgmt=WPA-EAP

eap=PEAP

identity="your_login"

password="your_password"

phase2="auth=MSCHAPV2"

}

For TTLS/PAP replace phase2 on:

    phase2="auth=PAP"

If the network uses certificates, specify the paths to them:

    ca_cert="/etc/ssl/certs/ca-certificates.crt"

client_cert="/path/to/client/certificate.pem"

private_key="/path/to/private/key.key"

private_key_passwd="key_password"

⚠️ Attention: When connecting to corporate networks Never save passwords in clear text in configuration files if the device is used in public places.. Use wpa_passphrase to generate a hashed PSK or configure the connection via NetworkManager with a password request every time you connect.

8. Alternative Wi-Fi Management Methods

Besides NetworkManager And wpa_supplicant, V Debian other tools available:

1. connman:

A lightweight network manager popular in minimalist environments (eg. i3 or Openbox). Install it:

sudo apt install connman

sudo systemctl enable --now connman

Console control:

connmanctl

> enable wifi

> scan wifi

> services

> connect wifi_XX_XX_XX_XX_managed_psk

2. wicd:

An outdated, but still functional, GUI manager. Installation:

sudo apt install wicd wicd-gtk

sudo systemctl enable --now wicd

Launch the graphical client:

wicd-client &

3. iwd (Intel Wireless Daemon):

A modern alternative wpa_supplicant from Intel, supporting the latest standards (including WPA3). Installation:

sudo apt install iwd

sudo systemctl enable --now iwd

Connection:

sudo iwctl

[iwd]# station wlan0 scan

[iwd]# station wlan0 get-networks

[iwd]# station wlan0 connect "Network_Name"

Comparison of tools:

Tool Pros Cons Recommendation
NetworkManager Graphical interface, VPN support, flexibility Heavy for minimalist systems For most users
wpa_supplicant Lightweight, versatile, and GUI-less. More difficult to set up For servers or advanced users
iwd Support WPA3, fast work Less documentation, not all functions For modern adapters Intel

FAQ: Frequently Asked Questions about Wi-Fi in Debian

My Wi-Fi adapter isn't detected by the system. What should I do?

1. Check the output lspci -knn | grep Net or lsusb — whether the device is defined at least as "unknown".

2. If the adapter Broadcom, install firmware-b43-installer and reboot.

3. For Realtek RTL88x2 Manual compilation of the driver may be required. Download the source code from GitHub and follow the instructions in README.

4. If the adapter is USB, try a different port or a hub with external power.

How to connect to Wi-Fi without a password (open network)?

IN wpa_supplicant.conf use configuration without psk:

network={

ssid="Open_network"

key_mgmt=NONE

}

Through nmcli:

nmcli dev wifi connect "Open_Network"

⚠️ Be careful: open networks often intercept traffic. Use VPN or SSH tunnel.

The Wi-Fi connects, but the speed is very slow. What's the problem?

Possible causes and solutions:

  • 🔹 Channel congestion: Check the channel load using sudo iw wlan0 survey dumpIf the channel is overloaded, change it in the router settings.
  • 🔹 Low signal level: Use iw dev wlan0 link to check. If the signal is weaker -70 dBm, move closer to the router or use a repeater.
  • 🔹 Driver limitation: For Realtek try disabling power saving: sudo iwconfig wlan0 power off.
  • 🔹 Legacy kernel: Update your kernel to the latest version (eg. linux-image-amd64 for 64-bit systems).
Is it possible to use Wi-Fi and Ethernet at the same time?

Yes, but by default Debian will use only one interface for the Internet (priority is given Ethernet). To use both:

1. Configure route metrics to ensure traffic goes through the correct interface:

sudo ip route add default via 192.168.1.1 dev eth0 metric 100

sudo ip route add default via 192.168.1.1 dev wlan0 metric 200

2. Use for load balancing bonding or teamd, but this requires additional configuration.

How to auto-connect to Wi-Fi on startup?

If you use NetworkManager:

nmcli connection modify "Network_name" connection.autoconnect yes

For wpa_supplicant add in /etc/network/interfaces:

auto wlan0

iface wlan0 inet dhcp

wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Check that the service wpa_supplicant starts automatically:

sudo systemctl enable wpa_supplicant