Chapter 5. Getting started with nmtui
The nmtui
application is a text user interface (TUI) for NetworkManager
. The following section provides how you can configure a network interface using nmtui
.
The nmtui application does not support all connection types. In particular, you cannot add or modify VPN connections or Ethernet connections that require 802.1X authentication.
5.1. Starting the nmtui utility
This procedure describes how to start the NetworkManager text user interface, nmtui
.
Prerequisites
-
The
NetworkManager-tui
package is installed.
Procedure
To start
nmtui
, enter:#
nmtui
To navigate:
- Use the cursors or press Tab to step forwards and press Shift+Tab to step back through the options.
- Use Enter to select an option.
- Use the Space bar to toggle the status of check boxes.
5.2. Adding a connection profile using nmtui
The nmtui
application provides a text user interface to NetworkManager. This procedure describes how to add a new connection profile.
Prerequisites
-
The
NetworkManager-tui
package is installed.
Procedure
Start the NetworkManager text user interface utility:
#
nmtui
-
Select the
Edit a connection
menu entry, and press Enter. - Select the Enter. button, and press
-
Select
Ethernet
, and press Enter. Fill the fields with the connection details.
- Select to save the changes.
-
Select
Back
to return to the main menu. -
Select
Activate a connection
, and press Enter. - Select the new connection entry, and press Enter to activate the connection.
- Select to return to the main menu.
-
Select
Quit
.
Verification steps
Display the status of the devices and connections:
#
nmcli device status
DEVICE TYPE STATE CONNECTION enp1s0 ethernet connected Example-ConnectionTo display all settings of the connection profile:
#
nmcli connection show Example-Connection
connection.id: Example-Connection connection.uuid: b6cdfa1c-e4ad-46e5-af8b-a75f06b79f76 connection.stable-id: -- connection.type: 802-3-ethernet connection.interface-name: enp1s0 ...
Additional resources
- For more information on testing connections, see Chapter 39, Testing basic network settings.
-
For further details about the
nmtui
application, see thenmtui(1)
man page. - If the configuration on the disk does not match the configuration on the device, starting or restarting NetworkManager creates an in-memory connection that reflects the configuration of the device. For further details and how to avoid this problem, see NetworkManager duplicates a connection after restart of NetworkManager service.
5.3. Applying changes to a modified connection using nmtui
After you modified a connection in nmtui
, you must reactivate the connection. Note that reactivating a connection in nmtui
temporarily deactivates the connection.
Procedure
In the main menu, select the
Activate a connection
menu entry:- Select the modified connection.
On the right, select the
Deactivate
button, and press Enter:- Select the connection again.
On the right, select the
Activate
button, and press Enter: