RHEL / CentOS 7 Configure Hostname using nmtui Text User Interface in a Terminal

Fig.01: Use nmtui to set hostname on a CentOS 7

Fig.01: Use nmtui to set hostname on a CentOS 7

You can use the nmtui command to set a host name in a terminal window as a root user:

nmtui

Use arrow key to select “Set system hostname” and enter the details. Finally, type the following command:

systemctl restart systemd-hostnamed

Examples and usage: RHEL / Centos Linux 7: Change and Set Hostname Command

Leave a Comment