nmcli(1)
NetworkManager command-line interface for controlling network connections and devices.
Synopsis
nmcli [OPTIONS] OBJECT { COMMAND | help }Description
nmcli is a command-line tool for interacting with NetworkManager, the system network service. It allows you to query network status, create/modify/delete network connections, control device activation and deactivation, and manage Wi-Fi networks from the terminal.
Common objects include: general (overall status), device (network interfaces), connection (connection profiles), radio (enable/disable wireless), and agent (authentication handling). Each object supports various commands like show, list, add, delete, modify, and activate.
Common options
| Flag | What it does |
|---|---|
-t, --terse | Output terse format; removes column headers and separators |
-p, --pretty | Output in pretty-printed format with colors and indentation |
-m, --mode tabular|multiline | Set output mode; tabular shows data in columns, multiline shows fields vertically |
-f, --fields field1,field2,... | Specify which fields to display in output |
-e, --escape yes|no | Escape column values in tabular output |
-n, --nocheck | Don't check if NetworkManager is running before executing |
-a, --ask | Ask for missing required parameters instead of using defaults |
-w, --wait seconds | Maximum time to wait for completion of operations |
--version | Show program version and exit |
-h, --help | Show help message and exit |
Examples
Show status of all network devices (Wi-Fi, Ethernet, etc.)
nmcli device statusList all available network connection profiles
nmcli connection showActivate the 'MyWiFi' connection profile
nmcli connection up MyWiFiScan and display available Wi-Fi networks
nmcli device wifi listConnect to a Wi-Fi network by SSID with password
nmcli device wifi connect 'SSID' password 'mypassword'Set a static IP address on the MyConnection profile
nmcli connection modify MyConnection ipv4.addresses '192.168.1.100/24'Disable all Wi-Fi adapters
nmcli radio wifi offList connection names and types in terse format
nmcli -t -f NAME,TYPE connection show