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
No comments:
Post a Comment