There are a few ways that the hostname can be modified from the command line. The recommended method is to use cPanel's API.
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Run the following command.
whmapi1 sethostname hostname=$hostname.domain.tldPlease note that "$hostname.domain.tld" needs to be replaced with the new hostname.