Hi, I am using CentOS 8, I need to change the hostname and cannot find a solution. Thank you.
You can change the hostname using the hostnamectl command by running the following commands:
sudo hostnamectl set-hostname host.example.com
sudo hostnamectl set-hostname "Your Pretty HostName" --pretty
sudo hostnamectl set-hostname host.example.com --static
sudo hostnamectl set-hostname host.example.com --transient
For example, to change the system static hostname to host.eldernode.com, you would use the following command:
sudo hostnamectl set-hostname host.eldernode.com
+8595670151
7 days a week, 24 hours a day