075-845-490 | 097-165-2449
Line ID: @hostnakhonitech
🎉 โปรโมชั่นพิเศษ! ลด 10% สำหรับลูกค้าใหม่
NakhoniTech
075-845-490
support@NakhoniTech.com

วิธีเปลี่ยน hostname บน CentOS 7 และ RHEL 7 nmtui command Print

  • CentOS 7
  • 0

You can set host name using nmtui command which has text user interface for new users:
# nmtui
Sample outputs:

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

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


Use the Down arrow key > select the “Set system hostname” menu option > Press the “Ok” button:

Fig.02: Set hostname

Fig.02: Set hostname


You will see the confirmation box as follows:

Fig.03: New hostname confirmed

Fig.03: New hostname confirmed


Finally, restart hostnamed service by typing the following command
# systemctl restart systemd-hostnamed
To verify changes, enter:
# hostnamectl status
Sample outputs:

Fig.04: CentOS 7 / RHEL View Host Name Details Using hostnamectl Command

Fig.04: CentOS 7 / RHEL View Host Name Details Using hostnamectl Command

 

บทความจาก cyberciti.biz


Was this answer helpful?

« Back