How to Enable Wi-Fi in Linux: A Step-by-Step Guide

Operating systems of the family Linux have long ceased to be the preserve of server administrators and command line enthusiasts. Today, distributions like Ubuntu, Fedora or Mint They are widely used on desktops, where wireless connectivity is the de facto standard. However, unlike proprietary systems, managing network interfaces often requires an understanding of the internal logic of the kernel and network managers. Users may encounter a situation where, after installing the system, the wireless network indicator is missing or the interface is locked.

The module activation process may vary depending on the distribution and desktop environment used. In some cases, the system automatically picks up the necessary driversIn others, manual intervention via the terminal is required. The key is determining the type of your network adapter and its software lock status. Without a clear understanding of these basics, further configuration turns into a chaotic attempt to guess the command.

In this guide, we'll cover everything from simple switch checks to complex installations of proprietary kernel modules. You'll learn how to diagnose problems, manage connections through a graphical interface, and nmcli, and configure static addresses. Let's move from theory to practice and launch your adapter.

⚠️ Note: The interfaces of graphical desktop environments (GNOME, KDE Plasma, XFCE) may differ visually. The layout of buttons and menus depends on the distribution version and installed add-ons, so the names of the menu items may vary slightly.

Diagnosing the status of a wireless adapter

Before attempting to connect to the network, you need to make sure the operating system even sees your wireless hardware. It often happens that the card is physically installed, but the driver for it isn't loaded, or the device is software-disabled. The first step should always be checking the list of network interfaces. For this, use the utility ip or older but still popular ifconfig.

Run the command ip link show in the terminal. In the list, you should see a device with a name starting with wl (For example, wlan0 or wlp2s0). If there is no such device, but there is only lo (loopback) and eth0 (wired port), then the system did not detect the card. This may indicate missing drivers or a hardware malfunction. If the device is present, but marked as DOWN, it needs to be raised.

Particular attention should be paid to the utility rfkill, which controls software locks on radio interfaces. Many laptops have a physical switch or key combination (often F2 or F12 (with an antenna icon) that disables Wi-Fi at the BIOS or kernel level. Enter the command rfkill list allto see the status of the blocks. If you see the status Soft blocked: yes, which means the blocking is software-based and can be removed.

📊 Have you ever encountered missing drivers in Linux?
Yes, I'm constantly looking for drivers.
Sometimes, on older laptops
No, everything works right away.
I only use a wired connection

To remove the software lock, use the command sudo rfkill unblock wifi. If the status Hard blocked: yes, then you won't be able to do anything programmatically—look for a physical switch on the laptop case or check the BIOS/UEFI settings. It's also worth checking whether the module is disabled in the kernel itself. lsmod | grep wifi or lsmod | grep 80211 will show loaded modules. If the list is empty, the module may simply not be loaded and needs to be activated via modprobe.

Managing connections via NetworkManager

In most modern distributions, a daemon is responsible for network management. NetworkManagerThis is a powerful tool that allows you to manage connections both through a graphical interface and via the console. The graphical applet is usually located in the system tray (notification area). Clicking on the network icon displays a list of available access points. Selecting the desired one and entering the password is the easiest way, but it doesn't always provide information about what's going on "under the hood."

For deeper control and configuration of servers without a graphical shell, a command line utility is used. nmcliIt allows you to scan networks, connect to them, and manage profiles. For example, to enable the wireless interface via nmcli enter:

nmcli radio wifi on

You can then scan for available networks with the command nmcli dev wifi listYou'll see a table with the SSID, signal strength, and security status. To connect to an open network, the command will look like this: nmcli dev wifi connect "Network_Name"If the network is password protected, add the flag password:

nmcli dev wifi connect "Network_Name" password "Your_Password"

Connection profile management is another strong point NetworkManagerYou can create a profile for your home network with a static IP address, and set up automatic address acquisition for your office. The list of profiles is displayed using the command nmcli connection showTo activate a saved profile, use nmcli connection up "Profile_Name"This is especially convenient when moving between different locations that require different configurations.

☑️ Checking NetworkManager settings

Completed: 0 / 4

Setup via Netplan (for Ubuntu and Debian)

In server versions Ubuntu (starting with 17.10) and some other distributions use the utility Netplan for network configuration. It works with YAML files located in the directory /etc/netplan/This is a declarative approach: you describe the desired network state, and Netplan applies it by generating configuration for the backend (usually NetworkManager or systemd-networkd).

First, find the name of your configuration file. Typically it is 00-installer-config.yaml or 50-cloud-init.yamlOpen it with superuser rights, for example: sudo nano /etc/netplan/00-installer-config.yamlIt's important to maintain proper indentation in YAML files—use spaces, not tabs. The file structure should clearly indicate which renderer is being used.

Configuration example for enabling DHCP (automatic IP acquisition) on a wireless interface wlan0:

network:

version: 2

renderer: NetworkManager

wifis:

wlan0:

access-points:

"YOUR_NETWORK_SSID":

password: "PASSWORD"

dhcp4: true

If you require a static IP address, the file structure will change. You will need to specify the address, gateway, and DNS servers manually. After making any changes to the YAML file, you must apply the configuration with the command sudo netplan applyIf the syntax is corrupted, the command will return an error and the network will not be reconfigured, which is a protective mechanism.

What should I do if Netplan doesn't apply the settings?

Check the indentation in the YAML file. Each nested entry must have exactly two spaces. Also, make sure the interface name (wlan0) matches the actual device name in the system.

Installing and updating drivers

One of the most common reasons for Wi-Fi not working in Linux is the absence of proprietary drivers. Open drivers (open-source) are built into the kernel, but for some chipsets (especially Broadcom and some Realtek) require closed binary modules. In distributions based on Debian/Ubuntu There is a convenient tool called "Additional Drivers" that scans your hardware and offers to install any missing packages.

In the terminal, this process can be automated. For Ubuntu And Mint a bag often helps linux-firmware, which contains firmware for many devices. Make sure it's installed and up to date:

sudo apt update

sudo apt install --reinstall linux-firmware

For devices Broadcom a package is often required bcmwl-kernel-sourceInstallation is performed by the command sudo apt install bcmwl-kernel-sourceAfter installation, you must reboot your computer or manually unload and load the kernel module. The situation with Realtek more difficult: sometimes drivers are not in the repositories, and they have to be compiled from source codes with GitHub, which requires the presence of packages build-essential And linux-headers.

Manufacturer Typical driver package Installation method Complexity
Intel iwlwifi (in the kernel) Automatic / linux-firmware Low
Broadcom bcmwl-kernel-source Repository / Additional Drivers Average
Realtek rtl88xxau-dkms (example) Compiling from source High
Atheros ath9k (in the kernel) Automatically Low

⚠️ Warning: Before compiling drivers from source code, be sure to create a system restore point or backup important data. An error compiling a kernel module may result in the system becoming unbootable.

Troubleshooting connection and stability issues

Even with the drivers installed, connection stability or speed issues may still occur. A common cause is a conflict between power saving modes. The adapter may go into sleep mode and lose connection with the router. To disable power saving for Wi-Fi, you can create a configuration file. For NetworkManager, create a file /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf and write the value there wifi.powersave = 2 (where 2 means saving is disabled).

Another challenge is managing multiple profiles. If you have saved networks with the same name (SSID) but different passwords or security settings, NetworkManager may be trying to connect to the wrong profile. In this case, it's helpful to delete old profiles with the command nmcli connection delete "Profile_Name" and re-establish the connection. It's also worth checking your IPv6 settings: if your provider doesn't support them and they're enabled by default in your system, you may experience connection delays.

To diagnose signal and channel quality, use the utility iwlist or nmcli dev wifi listPay attention to the signal level (Signal) and quality (Quality). If the signal is weak, try changing the channel on your router to a less crowded one (1, 6, or 11 for 2.4 GHz). It's also worth checking if a firewall is blocking the signal (ufw or firewalld) the required ports or protocols, although by default they usually allow outgoing connections.

Advanced Setup: Static IP and DNS

For servers or workstations that require a permanent address on the local network, a static IP configuration is necessary. This eliminates issues with SSH access if the DHCP server decides to change your device's address. NetworkManager This is done through the command nmcli connection modifyYou need to specify the IPv4 method as manual, address, gateway and DNS.

Example command to set a static address 192.168.1.50 with a gateway 192.168.1.1:

nmcli connection modify "ConnectionName" ipv4.method manual ipv4.addresses 192.168.1.50/24 ipv4.gateway 192.168.1.1 ipv4.dns "8.8.8.8 1.1.1.1"

After changing the parameters, you need to reactivate the connection: nmcli connection up "ConnectionName"Using public DNS such as Google DNS (8.8.8.8) or Cloudflare (1.1.1.1) often speeds up system response and resolves access issues with some resources. Remember that the static address should be outside your router's DHCP pool range to avoid IP address conflicts on the network.

How do I find out the DHCP range on my router?

Log into your router's web interface (usually 192.168.1.1 or 192.168.0.1) and find the LAN or DHCP Server section. The range may look like 192.168.1.100 - 192.168.1.200. Choose a static IP outside this range.

Why is there no Wi-Fi in Linux after installing the system?

Most often, the problem stems from the lack of proprietary drivers for your network adapter, which are not included in the standard kernel due to licensing restrictions. It's also possible that the driver is blocked by software via rfkill or missing firmware packages.

How to check if the Wi-Fi module is physically working?

Use the command lspci (for internal cards) or lsusb (for USB dongles). If the device appears in the list, it means the system physically sees it, and the problem is most likely software-related (drivers, settings).

Is it possible to share Wi-Fi from a Linux laptop?

Yes, most modern distributions support creating an access point (Hotspot) directly from the network settings in the graphical interface or via the command nmcli connection add type wifi ifname wlan0.. with ap mode.

What to do if the network is visible but does not connect?

Check the password, security type (WPA2/WPA3), and time on your computer. Also, try forgetting the network and reconnecting. Sometimes temporarily disabling IPv6 in the connection settings helps.