LinuxCommandLibrary

nmcli

TLDR

List all NetworkManager connections

$ nmcli connection
copy
Show device status
$ nmcli device
copy
Connect to a Wi-Fi network
$ nmcli device wifi connect ssid --ask
copy
Show available Wi-Fi networks
$ nmcli device wifi
copy
Show password for current Wi-Fi
$ nmcli device wifi show-password
copy
Activate a connection
$ nmcli connection up connection_name
copy
Deactivate a connection
$ nmcli connection down connection_name
copy

SYNOPSIS

nmcli [OPTIONS] {general|networking|radio|connection|device|agent|monitor} [COMMAND] [ARGUMENTS]

DESCRIPTION

nmcli is a command-line client for NetworkManager. It allows controlling NetworkManager and reporting network status, creating, editing, activating, and deactivating network connections, and managing network devices.

PARAMETERS

-t, --terse

Produce terse output suitable for scripts
-p, --pretty
Produce human-readable formatted output
-m, --mode tabular|multiline
Switch between output modes
-c, --colors auto|yes|no
Control colored output
-f, --fields
Specify which fields/columns to output
-e, --escape yes|no
Escape column separators in values
-a, --ask
Prompt for missing parameters
-s, --show-secrets
Display passwords and secrets
-w, --wait seconds
Set timeout for operations
--offline
Work without NetworkManager daemon

OBJECTS

general

Manage NetworkManager status, hostname, permissions, and logging
networking
Control overall networking state and connectivity
radio
Manage Wi-Fi and WWAN radio switches
connection
Manage network connection profiles
device
Manage network interfaces
agent
Run as a NetworkManager secret or polkit agent
monitor
Observe NetworkManager activity in real-time

COMMON CONNECTION COMMANDS

nmcli connection show: List all connections
nmcli connection up: Activate a connection
nmcli connection down: Deactivate a connection
nmcli connection add: Create a new connection
nmcli connection modify: Change connection settings
nmcli connection delete: Remove a connection
nmcli connection import: Import a VPN connection

CAVEATS

The --ask flag prompts for passwords interactively. Use --show-secrets carefully as it displays sensitive information. The -t option with -f is useful for scripting.

HISTORY

nmcli is the command-line interface for NetworkManager, first released around 2004. It provides a way to manage network connections on systems without graphical interfaces or for automation.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

$239.99
New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

$54.00
GMKtec Gaming PC, K11 AMD Ryzen 9 8945HS, 32GB DDR5 RAM 1TB Mini PC Desktop Computer, Oculink, Dual NIC 2.5GbE LAN, HDMI/DisplayPort/USB4*2

GMKtec Gaming PC, K11 AMD Ryzen 9 8945HS, 32GB DDR5 RAM 1TB Mini PC Desktop Computer, Oculink, Dual NIC 2.5GbE LAN, HDMI/DisplayPort/USB4*2

$739.99
Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

$54.00
Bmax Mini PC B2 Power Intel 5205U 8GB DDR4 256GB M.2 NVMe SSD ,HDMI 1.4&DP 1.2, USB3.2,4K Dual Display 2.4G/5G WiFi & BT5.0 Mini Desktop Computers /Office/Design

Bmax Mini PC B2 Power Intel 5205U 8GB DDR4 256GB M.2 NVMe SSD ,HDMI 1.4&DP 1.2, USB3.2,4K Dual Display 2.4G/5G WiFi & BT5.0 Mini Desktop Computers /Office/Design

$169.99
Raspberry Pi 5 8GB

Raspberry Pi 5 8GB

$134.50