Connecting to Wi-Fi on Arch Linux using nmcli
INFO
This guide explains how to use nmcli
to connect to Wi-Fi on Arch Linux. nmcli
is a command-line interface for NetworkManager, which is often used in many Linux distributions.
Connecting to a Wi-Fi Network
List available Wi-Fi networks:
shnmcli device wifi list
Connect to a Wi-Fi network:
shnmcli device wifi connect "SSID" --ask
TIP
Using
nmcli device wifi connect <AP name> --ask
is better thannmcli device wifi connect "SSID" password "password"
because it prevents the "Error: 802-11-wireless-security.key-mgmt: property is missing" issue.Check your connection:
shnmcli connection show
INFO
This will list all active connections, including the Wi-Fi network you're connected to.
Useful Commands
Disconnect from a Wi-Fi network:
shnmcli connection down id "SSID"
Reconnect to a Wi-Fi network:
shnmcli connection up id "SSID"
List all saved connections:
shnmcli connection show
List all available devices:
shnmcli device status
Show information about your current Wi-Fi connection:
shnmcli device show wlan0
INFO
Replace
wlan0
with the name of your wireless interface if it's different.
Troubleshooting
Check if Wi-Fi is enabled:
shnmcli radio wifi
Enable Wi-Fi:
shnmcli radio wifi on