Control NetworkManager connections from the shell to script, debug and automate interface tasks. 16.11.2025 | reading time: 2 min Quick scene: a headless Linux box needs reliable network control without a GUI; use `nmcli` to talk to NetworkManager and get the job done from the shell. Real task: set a static IP on eth0 Do this: check devices with `nmcli device status` (you will see `eth0` listed), create a connection and assign a static address with `nmcli connection add type ethernet ifname eth0 con-name static-eth0 autoconnect yes ip4 192.168.10.50/24 gw4 192.168.10.1`, verify with `nmcli connection show static-eth0` and activate it with `nmcli connection up static-eth0`; the commands return concise status lines that confirm creation and activation. Tweak, troubleshoot, automate Edit or tune a connection by running `nmcli connection modify static-eth0 ipv4.dns "8.8.8.8 1.1.1.1" ipv4.method manual` then reload with `nmcli connection up static-eth0`; check live events with `nmcli monitor`, bring interfaces down with `nmcli device disconnect eth0` and re-enable management using `nmcli device set eth0 managed yes`; combine these commands in scripts to automate deployments. Wireless and advanced options Use `nmcli device wifi list` to scan access points, `nmcli device wifi connect "SSID" password "secret"` to join a network, and `nmcli connection show --active` to inspect runtime state; `nmcli connection` supports VLANs, bonding, bridges and per-connection IPv6 or DNS settings, so model real network topologies without a GUI. When nmcli is not the whole story NetworkManager integrates with other systems: on servers you may encounter netplan or systemd-networkd, and low-level debugging still uses `ip` or `ss`; choose the tool that fits the environment and prefer nmcli when NetworkManager controls interfaces. Wrap-up and next steps You just saw how to list devices, create and modify connections, and bring interfaces up or down with `nmcli`; practice these commands on test systems, then expand into scripting to automate network builds and monitoring, and consider formal study to deepen skills and certification readiness such as CompTIA Linux+ or LPIC-1 with intensive preparation at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. network utilities troubleshooting scripting infrastructure