d4mourtzis96

Member
Mar 18, 2021
21
1
3
efpolis.com
cPanel Access Level
Website Owner
Hi all,
i am trying to change the server hostname since it changed with a whm update for no reason. I set it in whm/networking setup/ gostname and the log says it is changed succesfully but when i go to hostname again it is the previous cprapid hostname. Also the /etc/hostname file has the correct hostname.
What can i do?
 

kodeslogic

Well-Known Member
Apr 26, 2020
295
103
118
IN
cPanel Access Level
Root Administrator
Have tried the command line?

CentOS 7
Code:
Set the hostname
# hostnamectl set-hostname your-new-hostname

To verify 
# hostnamectl status
CentOS 6
Code:
Set the hostname
# hostname  your-new-hostname
# service network restart

To verify
# hostname
 
  • Like
Reactions: cPRex

HostNoc

Well-Known Member
Feb 20, 2020
82
12
8
Ontario
cPanel Access Level
Root Administrator
Hi

YOu can change your server host name by logging into WHM and in Basic configuration or from terminal via commang line hostname and enter the hostname you want to set
REgards