Two files need to be updated to change host name in Linux. Perform the changes as root user.

1. Update file:
# vi /etc/sysconfig/network
Change the value of HOSTNAME according to your need.

2. Update the file:
#vi /etc/hosts
If you have static IP then add as below: localhost localhost.localdomain mars hostname

3. Restart networking in server to apply changes:
#/etc/init.d/network restart