While Linux administrators often work at the command-line, it is certainly useful to have a visual representation of network configuration options. By running the nmtui command, you can call up a text-based user interface, or TUI. Navigating a TUI is accomplished by using the Tab key, the Spacebar, the Enter key, and the arrow keys. The Tab key moves the cursor from field to field. The arrow keys are used to make selections within the field. The Enter key is used to activate a setting, such as OK or Quit. The Spacebar is used to check or uncheck a check box.
If you see that Network Manager is running, then it is installed. But to be double-sure, you can execute this command in Debian:
# aptitude search network-manager
If Network Manager is installed, you’ll see it listed as follows (there will be an i designation to the left of it). In CentOS, you can check whether Network Manager is installed or not using the following command:
# yum list installed |grep NetworkManager
The nmtui command also offers shortcut wrappers to specific tasks within the menu. These take the form of the nmtui-edit, nmtui-connect, and nmtui-hostname commands. The first two commands are useful when you already know the name of the connection profile you want to activate or edit, whereas the last command sets the hostname system-wide.
The nmtui command allows you to configure Network Manager within a shell environment, but with GUI-like controls.
nmtui Command Examples
1. Open the user interface:
# nmtui
2. Show a list of available connections, with the option to activate or deactivate them:
# nmtui connect
3. Connect to a given network:
# nmtui connect name|uuid|device|SSID
4. Edit/Add/Delete a given network:
# nmtui edit name|id
5. Set the system hostname:
# nmtui hostname