23 November 2011

Change hostname on CentOS server

If your hosting provider has given you a rubbish or branded hostname for your server, you'll be pleased to know there is a simple way to see and change the hostname on a CentOS server.
Use:
sysctl kernel.hostname
to read the current hostname, and:
sysctl kernel.hostname=YOUR_SERVER_NAME
to change it.

No comments:

Post a Comment