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 listConnect to a Wi-Fi network:
shnmcli device wifi connect "SSID" --askTIP
Using
nmcli device wifi connect <AP name> --askis 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 showINFO
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 showList all available devices:
shnmcli device statusShow information about your current Wi-Fi connection:
shnmcli device show wlan0INFO
Replace
wlan0with the name of your wireless interface if it's different.
Troubleshooting
Check if Wi-Fi is enabled:
shnmcli radio wifiEnable Wi-Fi:
shnmcli radio wifi on
