nmcli-device

manages network interfaces using NetworkManager

TLDR

Show status of all network interfaces
$ nmcli device
List available Wi-Fi networks
$ nmcli device wifi
Connect to a Wi-Fi network (prompt for password)
$ nmcli device wifi connect [ssid] --ask
Connect to a hidden Wi-Fi network
$ nmcli device wifi connect [ssid] password [password] hidden yes
Show password and QR code for current Wi-Fi
$ nmcli device wifi show-password
Show detailed information about a device
$ nmcli device show [wlan0]
Disconnect a device
$ nmcli device disconnect [wlan0]
Rescan for available Wi-Fi networks
$ nmcli device wifi rescan

SYNOPSIS

nmcli device {status|show|set|connect|reapply|modify|disconnect|delete|monitor|wifi|lldp} [ARGUMENTS]

DESCRIPTION

nmcli device manages network interfaces using NetworkManager. It can show device status, connect to networks, manage Wi-Fi connections, and control interface state.

PARAMETERS

-a, --ask

Prompt for password when connecting
--rescan auto|no|yes
Control Wi-Fi scanning before listing
-w, --wait seconds
Timeout for finishing the operation
ifname
Network interface name (eth0, wlan0, etc.)

COMMANDS

status

Print status of all network devices
show [ifname]
Display detailed information about a device
set ifname [property value]
Set device properties (autoconnect, managed)
connect ifname
Connect a device
reapply ifname
Reapply connection settings to a device
disconnect ifname
Disconnect a device
delete ifname
Delete a software device
monitor [ifname]
Monitor device activity
wifi list
List available Wi-Fi access points
wifi connect ssid [password passwd] [hidden yes|no]
Connect to a Wi-Fi network, optionally specifying password and hidden status
wifi rescan
Request a Wi-Fi scan
wifi hotspot [ifname wlan0] [ssid name] [password passwd]
Create a Wi-Fi hotspot
wifi show-password
Show password for current Wi-Fi connection
lldp [list]
Show LLDP neighbors

INSTALL

sudo apt install network-manager
sudo apk add networkmanager-cli

CAVEATS

Wi-Fi operations require the NetworkManager daemon to be running and the device to be managed. Use --ask with wifi connect to interactively enter the password.

HISTORY

Part of the nmcli command-line interface for NetworkManager. Provides device-level network management.

SEE ALSO

nmcli(1), nmcli-connection(1), nmcli-general(1), iw(8), iwctl(1)