Connect to Wi-Fi on Arch Linux and Hyprland with nmcli

Quick answer: On a Hyprland desktop that already uses NetworkManager, run nmcli device wifi list, then nmcli --ask device wifi connect "YOUR_SSID". Hyprland manages windows; NetworkManager manages the connection. Use the network manager already configured on your machine.

Check which service owns your Wi-Fi

Before enabling anything, inspect the current setup. Starting a second manager for the same wireless interface can produce confusing connection failures. The commands below assume a NetworkManager desktop. On an installation environment or a system deliberately managed by standalone iwd, use that service’s workflow instead.

systemctl is-active NetworkManager
systemctl is-active iwd
ip link
rfkill list

An interface might be named wlp3s0 rather than wlan0. An active iwd service is not, by itself, proof of a conflict: NetworkManager can also use iwd as its Wi-Fi backend. Check the configuration before changing services. A hardware radio block needs the laptop’s switch or firmware setting; a software block can be removed with rfkill unblock wifi.

Connect with NetworkManager

If this desktop is intended to use NetworkManager and it is not installed, install it and enable its service. Skip this step when another network manager owns the connection, especially during a remote session.

sudo pacman -S networkmanager
sudo systemctl enable --now NetworkManager

List devices and nearby access points, then connect using an interactive password prompt. This avoids putting the Wi-Fi password directly into a command stored in shell history.

nmcli device status
nmcli radio wifi on
nmcli device wifi list
nmcli --ask device wifi connect "YOUR_SSID"

Replace YOUR_SSID with the network name. For multiple adapters, add ifname wlp3s0 using your actual interface. For a hidden network, add hidden yes. Enterprise Wi-Fi may need a separately configured 802.1X profile; this simple password workflow is for a personal Wi-Fi network.

Anzeige

Add a menu to Hyprland

For a terminal menu, run nmtui. For a tray applet, install network-manager-applet and add the following line to your Hyprland configuration. The desktop panel must provide a system tray for the applet icon to appear.

sudo pacman -S network-manager-applet
exec-once = nm-applet --indicator

For a quick check, launch nm-applet --indicator from an existing terminal. Avoid starting multiple applets when your desktop configuration already launches one.

If you deliberately use standalone iwd

Use the actual wireless device name from device list:

iwctl
device list
station wlan0 scan
station wlan0 get-networks
station wlan0 connect "YOUR_SSID"
exit

Association is only part of the connection: IP addressing and DNS must also be configured. Do not assume that connecting with iwctl automatically supplies those on every installation. If NetworkManager uses iwd as a backend, keep managing profiles through NetworkManager rather than creating a competing standalone configuration.

Verify the connection and diagnose failures

nmcli device status
ip address
ip route
getent hosts archlinux.org
journalctl -u NetworkManager -b --no-pager -n 50

A connected radio without an address suggests an addressing problem; an address without a default route suggests routing; working connectivity with failed hostname resolution suggests DNS. Inspect the relevant layer instead of repeatedly installing different Wi-Fi tools.

References

Command syntax: NetworkManager nmcli manual and official examples. Standalone iwd: iwctl manual and iwd network configuration. Hyprland startup: configuration keywords.

Ähnliche Beiträge

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert