Saturday, 6 November 2021

Setting host name in CentOS Linux 8

 

We can set host name to a Linux system by directly updating name in /etc/hostname file which will require reboot. 

In CentOS Linux 8 and latest versions we have hostnamectl command that will do the job without need of reboot.


Command - hostnamectl 
Syntax - hostnamectl set-hostname NAME






This will automatically update the /etc/hostname file and no reboot is required. 





No comments:

Post a Comment