Use 'sysctl' To Change The Hostname

Use sysctl to change the variable kernel.hostname:

Use:

sysctl kernel.hostname

To read the current hostname, and

sysctl kernel.hostname=NEW_HOSTNAME

To change it.