Vol. I · No. 46The command line sectionSat, 10 Oct 2026
Linux · interfaces & addressing

nmcli

network settings that persist

nmcli is the command-line face of NetworkManager, which manages networking on most desktops and many servers. Unlike ip, what it configures is saved and applied again at boot — a static address, a DNS server, a Wi-Fi password.

ip changes the network until reboot; nmcli changes it for good.

Overview
nmcli device status
each interface and its state
Saved profiles
nmcli connection show
the stored settings
Wi-Fi
nmcli device wifi list
scan and connect
Persistent
Yes
kept across reboots

At the terminal

Read the session first, then the notes: each numbered line in the output is answered by the note with the same number.

user@netflow — bashnetwork-manager
$ nmcli device status
1DEVICE TYPE STATE CONNECTION
2eth0 ethernet connected Wired connection 1
wlan0 wifi disconnected --
lo loopback unmanaged --
3$ nmcli device wifi connect "LabNet" --ask
Password:
4Device 'wlan0' successfully activated with 'f3a1c2d4-7b6e-4a90-8c11-2d5e9f0a1b3c'.
Illustrative session · names, sizes and dates are examples, and every address is from a documentation or private range
Reading the output

What the numbered lines are telling you

1
One line per interface

The device, its type, whether it is connected, and which saved profile it is using.

2
Device and connection are different

eth0 is the hardware. "Wired connection 1" is a profile — a set of saved settings applied to it.

3
Joining a Wi-Fi network

--ask prompts for the password instead of taking it on the command line, where it would be saved in your history.

4
Connected, and remembered

A profile has been saved. The machine will rejoin this network by itself next time.

Switches

A switch changes how the command behaves. These are the ones used day to day; man nmcli lists the rest. Single-letter switches can usually be joined, so -l -a may be written -la.

-t
Terse: colon-separated output for scripts.
-f FIELDS
Show only these fields.
-p
Pretty: add headers and alignment.
--ask
Prompt for missing values such as a password.
-s
Show secrets, such as saved Wi-Fi passwords. Needs root.

Variations worth knowing

The same tool, pointed at a narrower question. These four cover most of what it is reached for day to day.

nmcli connection show

Lists the saved connection profiles.

nmcli con mod "Wired connection 1" ipv4.addresses 192.168.1.50/24 ipv4.gateway 192.168.1.1 ipv4.method manual

Sets a static address on a profile.

nmcli con up "Wired connection 1"

Applies a profile after changing it.

nmtui

A menu-driven version of the same tool.

In cybersecurity

Saved connections store their passwords on disk.

Wi-Fi passwords are saved

Profiles live in /etc/NetworkManager/system-connections, readable only by root, with the passphrase in plain text. A root compromise reveals every network the machine has joined.

Automatic rejoining

A laptop will connect to any network with a remembered name. Remove profiles for open and public networks so an impostor access point cannot claim it.

Changing settings over SSH

A wrong address or gateway cuts your own connection, and it stays wrong after a reboot. Have console access before changing a remote machine’s network.

Protocols it shows

IPv4IPv6DHCPDNS

Read alongside