nmtui-hostname
Set system hostname using a TUI
TLDR
View documentation for the original command
SYNOPSIS
nmtui-hostname
Note: This command is an interactive utility and does not accept direct command-line arguments or options. All interactions occur within its text-based interface.
DESCRIPTION
nmtui-hostname is a text-based user interface (TUI) utility specifically designed to allow system administrators to interactively configure the system's hostname. It is an integral part of the NetworkManager suite of tools, providing a simplified, curses-based interface focused solely on this task.
When executed, it presents a straightforward screen displaying the current hostname, where the user can easily input and confirm a new desired hostname. NetworkManager then takes care of applying the change persistently across system reboots, typically by updating the /etc/hostname file and informing systemd-hostnamed. This command greatly simplifies hostname management, especially beneficial in server environments or remote SSH sessions where a graphical user interface is unavailable. It requires root privileges for operation.
CAVEATS
- Requires root privileges to execute successfully.
- Relies on the NetworkManager daemon being active and running on the system.
- Changes made using this utility are persistent across system reboots.
- As a TUI, it requires a terminal emulator capable of rendering ncurses interfaces.
INTERACTIVE USAGE
Upon launching, nmtui-hostname displays a simple interactive form. Users can typically navigate using arrow keys and the Tab key, input the new hostname into a dedicated text field, and confirm their changes using the Enter key. The interface is intuitive and designed for minimal interaction.
BACKEND INTERACTION
It's important to note that nmtui-hostname does not directly modify system configuration files. Instead, it communicates with the running NetworkManager daemon. NetworkManager then handles the proper persistent storage of the hostname, typically by updating the /etc/hostname file, and also ensures that systemd-hostnamed is notified of the change to update the system's runtime hostname.
HISTORY
The nmtui utility, from which nmtui-hostname is often a specialized invocation or symbolic link, was developed as part of the NetworkManager project. NetworkManager itself emerged as a key component in Linux distributions in the mid-2000s to simplify network configuration. nmtui specifically gained popularity as an accessible, curses-based alternative to command-line tools like nmcli or manual configuration, proving particularly useful for server management or minimal installations. nmtui-hostname provides a convenient, dedicated shortcut for the common administrative task of changing the system hostname, reflecting NetworkManager's evolution towards more specialized and user-friendly tools.
SEE ALSO
nmtui(1), hostname(1), hostnamectl(1), nmcli(1)