Loading...

Lab 61: Modern Network Management Tools

Manage NetworkManager connections using both TUI and CLI tools to inspect, modify, and restart profiles safely. Use nmcli to set a static IPv4 configuration and validate that the connection activates cleanly.

network core troubleshooting

Scenario

You are configuring a new laptop running NetworkManager. You need to review existing connection profiles and then convert a Wi-Fi connection to a static IPv4 configuration for a managed network segment. Your tools are the text UI (nmtui), the CLI (nmcli), and (where available) graphical editors like nm-connection-editor or desktop network settings.

Operator context

In production, NetworkManager is often the source of truth for persistent networking. Knowing how to inspect and change profiles from the terminal is essential for remote support, break/fix work, and controlled reconfiguration.

Objective

  • Launch the text-based NetworkManager UI (nmtui).
  • List all saved connections using nmcli.
  • Switch a connection to manual IPv4 addressing.
  • Assign a static IP and default gateway to the profile.
  • Restart the connection to apply changes.

What You’ll Practice

  • Navigating NetworkManager profiles with nmtui.
  • Enumerating and managing connections with nmcli connection.
  • Editing IPv4 method, address, and gateway settings on an existing profile.
  • Cycling a connection down/up to apply changes cleanly.

Walkthrough

Step 1 : Launch the text-based connection manager.
Command
nmtui

nmtui provides a reliable, SSH-friendly interface for basic network changes when a full desktop environment is not available.

[ ] Edit a connection
[ ] Activate a connection
[ ] Set system hostname
Step 2 : Show all connections using the command line.
Command
nmcli connection show

This lists saved profiles, their types, and the device they are currently bound to. It is the fastest way to confirm the exact profile name you will modify.

NAME                UUID                                  TYPE      DEVICE
Wired connection 1  e9b2f442-9c6f-11ee-a0e4-bb3b1a480001  ethernet  eth0
Wi-Fi Home          a3c4e210-9c6f-11ee-a0e4-bb3b1a480002  wifi      wlan0
Step 3 : Set the Wi-Fi connection’s IPv4 method to manual.
Command
nmcli connection modify "Wi-Fi Home" ipv4.method manual

Switching to manual tells NetworkManager you intend to supply static addressing rather than DHCP.

Connection 'Wi-Fi Home' successfully updated.
Step 4 : Assign a static IP and default gateway to the profile.
Command
nmcli connection modify "Wi-Fi Home" ipv4.addresses 192.168.10.100/24 ipv4.gateway 192.168.10.1

This sets the address and gateway on the profile. If DNS is also required for the environment, it is commonly set via ipv4.dns and ipv4.ignore-auto-dns.

Connection 'Wi-Fi Home' successfully updated.
Step 5 : Restart the connection to apply changes.
Command
nmcli connection down "Wi-Fi Home" && nmcli connection up "Wi-Fi Home"

Cycling the profile forces a clean reapply of settings. This is often the fastest way to confirm that the profile is valid and that the device can activate successfully.

Connection 'Wi-Fi Home' successfully activated.
Tooling note

On systems with a desktop environment, you may also see nm-connection-editor or GNOME network settings used to edit the same profiles. The underlying object is still a NetworkManager connection, and nmcli remains the most consistent remote-friendly interface.

Reference

  • nmtui : Text user interface for configuring and activating NetworkManager connections.
  • nmcli connection show : Lists saved connection profiles and their associated devices.
  • nmcli connection modify "<name>" ipv4.method manual : Sets a connection profile to use static IPv4 addressing.
  • nmcli connection modify "<name>" ipv4.addresses <ip/prefix> ipv4.gateway <gw> : Assigns a static IPv4 address and default gateway to a profile.
  • nmcli connection down "<name>" && nmcli connection up "<name>" : Deactivates and reactivates a connection profile to apply changes.
    • && : Runs the second command only if the first succeeds.
  • nm-connection-editor : Graphical editor for NetworkManager connection profiles (availability depends on the desktop package set).