[Users] Hostname issue on CentOS 7.x

Michael Stauber mstauber at blueonyx.it
Thu Nov 10 21:20:40 PST 2016


Hi Jean-Pierre,

> I have tried changing the hostname via cPanel or even manually 
> but after rebooting it goes back to server1

Try this:

/usr/bin/hostnamectl set-hostname server1.domain.com

You can also poll the status like this:

/usr/bin/hostnamectl status
   Static hostname: server1
Transient hostname: server1.domain.com
         Icon name: computer-container
           Chassis: container
        Machine ID: .....
           Boot ID: .....
    Virtualization: openvz
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 2.6.32-042stab120.6
      Architecture: x86-64

-- 
With best regards

Michael Stauber


More information about the Users mailing list