How to change a hostname command in Centos

Centos 6 and above now has an easy to use command to change the hostname of your server.

Simple type:

hostname (newhostnamehere)

Replace (newhostnamehere) with what you want the hostname to be.

It’s nice when things are actually simple, good job job guys.