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
If you encounter the below error while running the nmtui command:
nmtui: command not found
you may try installing the below package as per your choice of distribution:
OS Distribution | Command |
---|---|
Debian | apt-get install network-manager |
Ubuntu | apt-get install network-manager |
Alpine | apk add networkmanager |
Arch Linux | pacman -S networkmanager |
Kali Linux | apt-get install network-manager |
Fedora | dnf install NetworkManager-tui-1 |
Raspbian | apt-get install network-manager |
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