BIP KB:
How To Change Your Hostname
Article By jason
![]() |
Change the hostname line in /etc/sysconfig/network to the hostname you want (this file may be different on FreeBSd and others). |
Your hostname should be something prefixing a domain you own (this is referred to as a fully qualified domain name, FQDN), so server1.yourdomain.com for example, not just yourdomain.com.
Changing it in that file ensure that your hostname gets set each time networking starts, however you'd need to restart networking for it to get set in the current session with just that changed.
This is not required for our current running environment however, we can just set it with the hostname command. To do so run:
hostname server.yourdomain.com
If you are running a cPanel server, you will want to simply change the hostname in under both Main » Server Configuration » Basic cPanel/WHM Setup and Main » Networking Setup » Hostname.
Tags: don't wait to educate, centos, cpanel, how-to, ubuntu, host name
Spin up a VPS server in no time flat
Simple setup. Full root access. Straightforward pricing.
Leave a Reply
Feedbacks
![]() This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License. |