How to change hostname – CentOS

To change the CentOS host name you should edit: /etc/sysconfig/network You can use your favorite editor (like vi) vi /etc/sysconfig/network * i prefer mcedit Change Hostname: (replace 01.direkthost.net with your own hostname) HOSTNAME=01.direkthost.net Also edit, and add your own hostname: /etc/hosts Restart your network  (CentOS 6 / CentOS 7) /etc/init.d/network restart systemctl restart...