How to Change Host Name on Linux Centos 6 and 7?

ForumCategory: LinuxHow to Change Host Name on Linux Centos 6 and 7?
Zain Hosting Staff asked 1 month ago

Hello, please tell me how to change my default host name of my VPS in linux centos 6 and 7? Currently my name servers are default vmi283.zainhosting.net.

1 Answers
Zain Hosting Staff answered 1 month ago

Its a very simple task,

login to your ssh with root account via putty etc.

now fire this command

hostname

it will show you your current host name or server name,

now fire this command to change the server name,

hostname set.yourhostname.com

replace set.yourhostname.com with your desired host name.

now just restart your linux centos VPS by this command

reboot

or restart network only by this command

service network restart

Your Answer

Accepted file types: txt, jpg, pdf

Add another file