If you want to change your Virtual Private Server's hostname, you first need to login to your VPS via SSH.
- Then, edit /etc/sysconfig/network and change the current hostname to the new hostname. You can either use pico, or nano, or vi, or any other editor that you're familiar with
- Once done, edit /etc/hosts and update the hostname there as well.
- Finally, run hostname {new.hostname} to change it globally.
- You may need to reboot for the kernel to see the new hostname as well.