Enabling Wi-Fi on Linux Mint via Terminal: A Step-by-Step Guide

Using the graphical interface in Linux Mint is familiar to most users, but in situations where the graphical shell is unresponsive, the system is in crash mode, or remote administration is required, knowledge of the command line becomes critical. The terminal provides direct access to network utilities, allowing for faster and more flexible connection management than standard taskbar applets. In this article, we'll take a detailed look at how to enable a wireless connection using the power of the command line.

The main tool for network management in modern distributions, including Linux Mint, is NetworkManager, and its console client nmcli Allows you to perform virtually any action available in the GUI. Understanding the operating principles of these utilities is essential for system administrators and advanced users who want to automate processes or troubleshoot complex network issues. We'll cover not only basic activation but also the nuances of working with profiles and drivers.

Before you start entering commands, make sure you have physical access to the device or have a terminal window open with root privileges. In some cases, especially when working with hardware Wi-Fi switches On laptops, software methods may not work without first unlocking at the BIOS level or using a physical key. Being prepared to work with the code is a key factor in the success of this process.

Checking the status of network equipment

The first step before attempting any connection is to diagnose the current state of your network adapter. The system must "see" your wireless device, otherwise software commands will be useless. To obtain detailed information about network interfaces in Linux Mint, use the utility ip, which replaced the outdated one ifconfig.

Run the command ip link showto see a list of all network interfaces. You need to find the device, whose name usually begins with the prefix wl (For example, wlp2s0 or wlan0). If such an interface is not listed, this may indicate a lack of drivers or a hardware failure of the device.

⚠️ Attention: If the team ip link If the wireless interface isn't showing up, check to see if it's blocked at the kernel or BIOS level. A common error is that the physical switch on the laptop case is not working.

Additionally, you can use the command nmcli device status, which will show the status of devices managed by NetworkManager. In the column TYPE must be specified wifi, and in the column STATEdisconnected (if Wi-Fi is off) or connectedIf you see the status unmanaged, this means that NetworkManager does not control this device, and editing the configuration files will be required.

Activating the wireless adapter

Once you've verified the hardware is present, you need to ensure the radio module is enabled. In Linux Mint, this is accomplished with the command nmcli radioIt often happens that the adapter is physically functional, but soft-blocked. To enable all wireless devices, use the command:

nmcli radio wifi on

If the status hasn't changed after running this command, the device may be hard-blocked. In this case, the following command will help: rfkill unblock wifi, which removes software locks. It is important to understand the difference between the states up (interface raised) and on (radio module is on).

To check the result, run nmcli radio allYou should see that Wi-Fi is set to enabled And onIf the status remains disabled, check permissions: network management commands often require privileges sudo.

  • 📡 nmcli radio wifi on — includes wireless module.
  • 🔒 rfkill unblock wifi - removes the lock from the device.
  • 👁️ nmcli device status — shows the current status of the adapters.
  • ⚙️ sudo ip link set dev wlp2s0 up — raises the interface to the kernel level.

☑️ Adapter diagnostics

Completed: 0 / 4

Search and scan for available networks

Once the adapter is activated, the next logical step is to scan for available access points. The network scanner in Linux Mint works through the same nmcliThe scan command may take several seconds because the system needs to collect beacon packets from surrounding routers.

nmcli device wifi list

The result of execution will be a table containing columns SSID (network name), MODE (operating mode), CHAN (channel), RATE (speed), SIGNAL (signal level) and BARS (Visual display of strength). Pay attention to the SIGNAL column: the higher the percentage, the more stable the connection will be. Networks with a hidden SSID will be displayed as -- or require manual entry.

If the list of networks is empty, although the router is definitely working, try to force a scan update or restart the NetworkManager service with the command sudo systemctl restart NetworkManagerIt's also worth considering that frequent scanning can put a strain on the processor and reduce the current connection's throughput.

Parameter Description Importance
SSID Wireless network name High
SIGNAL Signal level in percent Critical
SECURITY Encryption type (WPA2, WPA3) Average
CHAN Frequency channel (2.4 or 5 GHz) Low
📊 What signal level is considered the minimum comfortable for work?
Less than 30%
30-50%
50-70%
More than 80%

Connecting to an access point

The most important step is the actual connection. To connect to an open network, you only need to specify the SSID, but in most cases a password will be required. The command syntax requires the use of a flag. ssid for the network name and password for the security key.

nmcli device wifi connect "Network_Name" password "Your_Password"

Please note that if the network name or password contains spaces or special characters, they must be enclosed in quotation marks. The system will automatically create a connection profile and attempt to obtain an IP address via DHCP. Successful completion will be confirmed with a message. Connection successfully activated.

In case of connection error, the system will display an error code, for example, secrets-were-wrong (incorrect password) or no-secrets (A password is required but not provided.) For corporate networks with WPA2-Enterprise encryption, additional parameters such as username or identity may be required.

⚠️ Note: When entering your password in the terminal, characters are not displayed (no asterisks). This is standard Linux security behavior. Please enter your password carefully, checking your keyboard layout.

If you use WPS (Although this is less secure and rarely supported directly in the CLI without plugins), the process may vary. However, the standard password method is the most secure and supported in all versions of Linux Mint, including Cinnamon, MATE, and Xfce.

Managing connection profiles

Linux Mint saves successful connection configurations as profiles. This allows it to automatically connect to known networks when they appear in range. These profiles can be managed using the command nmcli connection.

To view all saved profiles, use nmcli connection showYou'll see a list of connection names, their UUIDs, and device types. To delete an old or unnecessary profile, for example, one with incorrect settings, use the command nmcli connection delete "Profile_Name"This often helps resolve issues with settings sticking.

How to change connection priority?

If you have multiple saved networks, the system will attempt to connect to the one that was most recently used or has a higher priority in the configuration. You can change these settings using nmcli connection modify.

To edit an existing profile, for example, to change the IP acquisition method from DHCP to static, use the command nmcli connection modifyThis is a powerful tool that allows you to configure DNS, MTU, and other parameters without a graphical interface. For example, setting up a static DNS: nmcli con mod "Home_WiFi" ipv4.dns "8.8.8.8 8.8.4.4".

  • 📝 show — displays a list of profiles.
  • 🗑️ delete — deletes the connection profile.
  • ✏️ modify — changes profile parameters.
  • 🔌 up/down — activates or deactivates the profile.

Solving common problems

Even with the correct command syntax, errors related to drivers or configuration conflicts may occur. A common issue in Linux Mint is the lack of proprietary drivers for some network cards, especially Broadcom or older Realtek models. In this case, the interface may not appear in the system at all.

For diagnostics use the command dmesg | grep wifi or journalctl -u NetworkManagerto view the system log for driver initialization errors. If you see messages about firmware missing, you will need to install a firmware package, often called linux-firmware or specific to your vendor.

⚠️ Note: Interfaces and package names may vary depending on the version of Linux Mint and the Linux kernel. Always check the package names in the official repositories for your distribution.

Another reason for failures may be a conflict between services. NetworkManager And wicd or netplan, if they are installed simultaneously. Linux Mint uses NetworkManager by default, and having other managers installed may cause unpredictable behavior. Make sure only one network management service is active.

If nothing helps, try completely rebooting the network stack with the command sudo systemctl restart NetworkManagerIn extreme cases, a system update may corrupt the configuration, and resetting NetworkManager settings to default values ​​may be the only solution.

Why is nmcli command not found?

If the terminal reports that the command nmcli Not found means the NetworkManager package is not installed or added to the execution path. In Linux Mint, it is installed by default, but may have been accidentally removed. Install it via sudo apt install network-manager.

How to connect to a hidden network (Hidden SSID)?

To connect to a network with a hidden name, use the command: nmcli device wifi connect "Network_Name" password "Password" hidden yes. Flag hidden yes is required, otherwise the system will search for an open network with that name.

Is it possible to share Wi-Fi with Linux Mint?

Yes, you can create an access point using the command: nmcli device wifi hotspot ssid "MyHotspot" password "12345678"This will create a virtual access point using your primary network interface.

Where are Wi-Fi passwords stored in Linux Mint?

Passwords are stored in encrypted form in files along the path /etc/NetworkManager/system-connections/Viewing the file's contents requires root privileges, and the file itself is protected from being read by regular users.

What should I do if Wi-Fi is slow after connecting?

Check if the adapter has entered power saving mode. Disable it using the command: sudo iwconfig wlp2s0 power off (replace wlp2s0 with your interface). Also, make sure you're connected to the 5 GHz band, not 2.4 GHz.