Switching to an open source operating system often involves searching for answers to basic questions, and wireless network connectivity is at the forefront. Unlike Windows, where drivers are often installed automatically, in the world of Linux The user sometimes has to be a little more involved in the hardware setup process. However, modern distributions like Ubuntu, Fedora, and Linux Mint offer powerful tools that make this process virtually seamless for the average user.
There are several ways to activate the wireless module: from the graphical interface, familiar to every beginner, to command-line utilities, which are indispensable on servers or when a graphical shell is missing. The method you choose depends on your goals, the distribution version, and whether you have network managers installed. In this article, we'll cover all the current options in detail so you can choose the one that best suits your situation.
Before you begin setting up, make sure that your Wi-Fi adapter Physically connected and powered on. Some laptops have hardware switches or function keys (often Fn+F2 or similar) that can block the module at the BIOS or ACPI level. If the LEDs are off and the system doesn't detect wireless networks, checking the physical state of the device is the first logical step before delving into software settings.
Using the NetworkManager GUI
Most modern Linux distributions use it by default. NetworkManager for managing network connections. This convenient tool provides a graphical user interface (GUI) for quick configuration. In distributions with the GNOME, KDE Plasma, or XFCE desktop environments, the network icon is usually located in the system tray or top panel. Clicking it opens a list of available wireless networks, where you simply select the desired one and enter the password.
If automatic connection doesn't occur, you can create a profile manually through the system settings. In the settings menu, find the "Network" or "Wi-Fi" section, enable the wireless module if it's disabled, and click the "Add new connection" button. Here you can specify SSID network, security type (usually WPA2/WPA3 Personal), and password. For corporate networks or specific configurations, proxy settings, static IP addresses, and DNS servers are also available.
The graphical interface also allows you to manage multiple profiles. You can set network priority so your computer automatically connects to a known home Wi-Fi network, ignoring open networks at cafes. Additionally, the privacy settings often include an option to use a random MAC address, increasing your anonymity in public places.
Connecting via terminal using nmcli
For those who prefer the command line or work on a server without a graphical shell, the utility nmcli (NetworkManager command line interface) is a standard tool. It allows you to manage all NetworkManager functions directly from the terminal. Before you begin, make sure the NetworkManager service is running. To scan available networks, use the command, which will list the SSIDs, signals, and security status.
The connection process consists of creating a connection and activating it. First, you need to create a new profile, specifying the device name (e.g., wlan0), the network name, and the password. Once the profile is created, you can activate the connection. If the network is hidden, add a flag indicating that the SSID is not broadcast. All changes are applied immediately and saved for automatic connection at system startup.
⚠️ Attention: When entering passwords on the command line, make sure you do not use the command history in the shared logs if there are other administrators working on the server, as passwords may remain in the ~/.bash_history file.
Managing connections via nmcli Provides flexibility unavailable in the GUI. You can script complex network switching scenarios based on the time of day or the availability of a specific gateway. The utility also allows you to easily change DNS servers on the fly without restarting the network service, which is often necessary when debugging name resolution issues.
nmcli dev wifi list
nmcli dev wifi connect "SSID_network" password "your_password"
Setting up Wi-Fi using nmtui
If working with pure text commands seems too complicated for you, and there is no graphical interface, the ideal solution is the utility nmtui (NetworkManager Text User Interface). This is a pseudo-graphical interface running in a terminal, controlled by the keyboard arrow keys and the Enter key. It visually resembles a BIOS or old installation menus, making it intuitive.
To launch, simply enter the command nmtui In the terminal as root. In the menu that opens, select "Activate a connection." You'll see a list of available wireless networks. Select the desired one, press Enter, enter the password, and the system will attempt to establish a connection. The interface also allows you to edit existing profiles, change IP addressing, and DNS settings.
☑️ Check before configuring nmtui
The main advantage nmtui Before manually editing configuration files, automatic syntax checking and validation of input data is performed. You won't be able to save settings with an incorrect IP address format or select a non-existent encryption type. This makes the tool an excellent choice for beginners who are concerned about damaging configuration files by manually editing them.
Manual configuration via wpa_supplicant
In minimalist systems or older distributions where NetworkManager is missing, the main tool remains wpa_supplicantThis is a daemon that manages wireless connections and supports various encryption methods. Configuration through it is more labor-intensive, but it provides complete control over the authentication process and allows working with equipment poorly supported by standard managers.
The process begins with the creation of a configuration file, usually located at /etc/wpa_supplicant/wpa_supplicant.confThis file contains the network block with the SSID and password parameters. The password can be stored in cleartext or hashed (PSK), which is more secure. A utility is used to generate the password hash. wpa_passphrase.
| Parameter | Description | Example of meaning |
|---|---|---|
| ssid | Wireless network name | "HomeWiFi" |
| psk | Password or key hash | "mypassword123" |
| key_mgmt | Key Management Protocol | WPA-PSK |
| proto | Security protocols | RSN WPA |
After configuring the file, you need to start the daemon, specifying the interface and path to the configuration. A DHCP client is usually started in parallel (for example, dhcpcd or dhclient) to obtain the IP address. This method requires precision: one typo in the configuration will result in an inability to connect, and debugging can take time.
How to generate a password hash for wpa_supplicant?
Use the wpa_passphrase "SSID" "password" command. The command output contains a pre-built network block, which can be copied directly into the config file, replacing the plaintext password with a hash.
Installing and checking Wi-Fi drivers
A common cause of non-working Wi-Fi on Linux is the lack of proprietary drivers for the wireless adapter. Unlike the system kernel, which is regularly updated, the firmware for some cards (especially Broadcom or Realtek) may not be included in the default installation. To diagnose this, use the command lspci (for internal cards) or lsusb (for USB adapters) to identify the device model.
Many distributions have mechanisms for automatically searching and installing drivers. In Ubuntu and Mint, this is the "Additional Drivers" tool, which scans the system and suggests installing closed-source modules. In Arch Linux and Fedora, firmware packages are often located in separate repositories (for example, linux-firmware), which need to be installed via the package manager.
⚠️ Attention: If you install drivers manually from source code (using make/make install), keep in mind that updating the system kernel will cause the driver to stop working. You'll need to recompile it or use DKMS to automatically rebuild modules.
In some cases, it may be necessary to disable built-in drivers that conflict with new ones. This is done by creating blacklist files in the directory /etc/modprobe.d/For example, for Broadcom cards it is often necessary to disable the driver bcma or b43to make the proprietary module work wlThe exact instructions always depend on the specific chipset model.
Diagnosing and resolving connection problems
Even with proper settings, connection stability or speed issues may still occur. Use the following utility to diagnose the issue. iwconfig or more modern iw, which will show the signal strength, link quality, and frequency. Low signal strength may be caused by interference from neighboring networks or household appliances operating at the 2.4 GHz frequency.
System logs contain valuable information about authentication errors or connection failures. In most distributions, use journalctl -u NetworkManager or view files in /var/log/syslogSearch keywords: "firmware," "deauthenticated," "association." Log analysis helps determine whether the issue is with the driver, router, or security settings.
If the network is visible, but the connection keeps dropping, try changing the channel on your router or switching to the 5 GHz band if your adapter supports the standard. 802.11ac/axIt's also worth checking your power saving settings: some adapters go into sleep mode to save power, which causes disconnects. You can disable this through the TLP settings or by editing the driver configuration.
Why doesn't Linux see my Wi-Fi adapter?
Most often, the problem stems from the lack of firmware for a specific model. Check the output of the dmesg | grep firmware command immediately after turning on the device. If there are messages about firmware loading errors, you need to find and install the linux-firmware package or the specific firmware file for your chipset.
How to save a Wi-Fi password in plain text?
In NetworkManager, passwords are stored with restricted access by default. To make them visible to all users or programs, you need to change the permissions parameter in the connection configuration file (located in /etc/NetworkManager/system-connections/) and remove the access rights line, leaving only the basic network settings.
Is it possible to share Wi-Fi from a Linux laptop?
Yes, most modern adapters support hotspot mode. In NetworkManager, this is done by creating a new connection with the "Hotspot" type. The system will automatically configure the necessary DHCP and NAT parameters, turning your laptop into a router.