nmcli

Basic Commands

CommandDescription
nmcliShow general help
nmcli general statusShow overall NetworkManager status
nmcli general hostnameView or set system hostname
nmcli radio allShow Wi-Fi and Bluetooth state
nmcli networking on/offEnable or disable all networking
nmcli connection showList saved connections
nmcli device statusShow status of all devices

Device Management

CommandDescription
nmcli deviceList all devices
nmcli device showShow detailed info for all devices
nmcli device disconnect <device>Disconnect a specific device (e.g. wlan0)
nmcli device connect <device>Connect a specific device

Wi-Fi

CommandDescription
nmcli device wifi listList available Wi-Fi networks
nmcli device wifi connect <SSID> password <password>Connect to a Wi-Fi network
nmcli device wifi connect <SSID> --askConnect to a Wi-Fi network and ask for password
nmcli connection show --activeShow active connections
nmcli connection up <name>Activate a connection
nmcli connection down <name>Deactivate a connection

Connections (Profiles)

CommandDescription
nmcli connection add type ethernet ifname eth0 con-name homeAdd new Ethernet connection
nmcli connection modify <name>Modify connection settings
nmcli connection delete <name>Delete a saved connection
nmcli connection clone <name> <new_name>Clone a connection profile

Reset and Troubleshooting

CommandDescription
nmcli connection reloadReload all connection profiles
nmcli networking off && nmcli networking onRestart networking
nmcli --askPrompt for password or secrets interactively

Leave a Reply

Your email address will not be published. Required fields are marked *