Nmtui is short for Network Manager Text User Interface. It presents a curses-based TUI containing interactive prompts. Whereas nmcli commands can be complex and tricky to remember, a single nmtui invocation drops you into a set of menus that help you configure your connections.
Main Menu
Running nmtui with no arguments displays a menu of three options. Use your arrow keys to highlight an item, then press enter to select it.
Edit a connection – This sub-menu provides options to add, edit, and delete known connections. Activate a connection – This screen shows the Wi-Fi networks you’re within range of and lets you open a connection. Set system hostname – Displays a popup prompt that lets you edit your machine’s hostname. This change will take effect across your system.
You can jump straight to one of these menus by supplying nmtui an appropriate argument:
nmtui edit or nmtui-edit– Show the edit screen. nmtui connect or nmtui-connect – Show the connections screen. nmtui hostname or nmtui-hostname – Launch the hostname editing prompt.
You can get out of the menu by highlighting the “Quit” option or pressing Esc. When you’ve traveled down through multiple screens, keep pressing Esc to navigate back up and eventually leave the program.
Connecting to a Network
Connections are enabled via the “Activate a connection” screen. You’ll see a list of all the nearby Wi-Fi networks, including a bar graph indication of signal strength.
Use the up and down arrow keys to select the network you want to join. Either press Enter or tab across to the “Activate” button to complete the connection. You’ll be prompted to enter the network’s password if it has protection.
One limitation of the connection screen is the absence of a “scan for available networks” button. The list does refresh periodically but it can take up to a minute to present a network you’ve just come within range of.
You can use nmtui’s CLI-based counterpart, nmcli, to force an immediate rescan. Drop out of nmtui and run nmcli rescan in your terminal. Run nmtui connect again to launch back into the graphical network selection screen which should now be refreshed with up-to-date options.
Nmtui’s activation screen also lets you disconnect from networks. Scroll to your connection in the list and hit Enter to go offline. You don’t need to manually deactivate if you’re switching to another network: find the new one in the list and press Enter to connect in one step.
Viewing Saved Connections
The “Edit a connection” menu lists all the Wi-Fi networks known to your device. Select a connection for editing by highlighting it with the arrow keys, pressing Tab to get to the right sidebar menu, and then highlighting the “Edit…” option. Press Enter to display the connection’s details.
Use the form to adjust your network’s properties. The “profile name” field at the top changes the network’s display name within Nmtui. This is independent of the Wi-Fi SSID which is set two fields down. It’s followed by a “Password” field so you can apply any Wi-Fi password changes you’ve made on your router.
The following sections, IPv4 Configuration and IPv6 Configuration, give you advanced control over network access and routing. Use the arrow keys to highlight the “Show” button, then press Enter to access these sections. You’ll see new fields that let you assign a static IP address, set a gateway IP, and customize your DNS servers.
Checkboxes at the bottom of the screen control the network’s availability. Clear the “Automatically connect” field to stop your device using the network whenever it’s in range. This is ideal for infrequently used or potentially insecure networks. The “available to all users” checkbox controls whether other Linux user accounts can access this network using your stored credentials.
Once you’re done with your edits, use the arrow keys to reach the Cancel and OK buttons at the bottom of the form. Tab across to “OK” and press Enter to save.
Nmtui’s list of stored connections also lets you add new networks without connecting to them first. Select the “Add” link in the right sidebar, above the “Edit…” button used above, to get a blank connection details form that lets you fill out the SSID and password to save. Known networks can be deleted by selecting them in the list, tabbing across to the right sidebar, and using the arrow keys to highlight “Delete”.
Summary
Nmtui is a simple interface to NetworkManager, the system daemon responsible for initializing and maintaining network connections. Nmtui lets you take control of your networks without leaving your terminal or learning long command strings. You can activate connections, edit their properties, and remove them from your system using Nmtui’s interactive menus.
While we’ve focused on Wi-Fi connections in this article, Nmtui is also compatible with wired and virtual networking devices. You’ll see these at the bottom of the “Edit a connection” menu. Selecting any of the connections will let you edit its IP addresses and DNS settings.
For more advanced control, you’ll need to look behind the scenes and use nmcli directly. This command-line tool exposes all the capabilities of NetworkManager, including hardware controls for your system’s network devices.
You can get detailed guidance on using both Nmtui and Nmcli by reading their respective manual pages. man nmtui and man nmcli contain instructive information on the available commands and flags.