nmcli – NetworkManager Command Line Interface

nmcli is the powerful command-line interface for NetworkManager, enabling comprehensive network configuration and management from...

Networking Tools Linux Open Source

nmcli is the powerful command-line interface for NetworkManager, enabling comprehensive network configuration and management from the terminal. This tool allows you to create, modify, activate, and monitor network connections including Ethernet, WiFi, VPN, and mobile broadband. For system administrators and power users, nmcli provides scriptable network management without requiring a graphical interface.

Key Features

  • Connection Management – Create, edit, delete, and activate network profiles
  • WiFi Control – Scan, connect, and manage wireless networks
  • Device Status – View and control network interfaces
  • VPN Support – Configure and manage VPN connections
  • Scriptable Output – Terse mode for parsing in scripts
  • Interactive Editor – Built-in connection editor for complex configurations

Installation

# nmcli comes with NetworkManager
# Debian/Ubuntu
sudo apt install network-manager

# RHEL/CentOS/Fedora
sudo dnf install NetworkManager

# Arch Linux
sudo pacman -S networkmanager

Common Usage Examples

# Show all connections
nmcli connection show

# Show device status
nmcli device status

# Connect to WiFi
nmcli device wifi connect "SSID" password "password"

# List available WiFi networks
nmcli device wifi list

# Create static IP connection
nmcli connection add type ethernet con-name "static" ifname eth0 ip4 192.168.1.100/24 gw4 192.168.1.1

# Activate connection
nmcli connection up "connection-name"

# Show connection details
nmcli -p connection show "connection-name"

Use Cases

nmcli is essential for headless server administration, automated network configuration, managing multiple network profiles, WiFi troubleshooting, and scripting network setup tasks.

Download NetworkManager

Was this article helpful?