Hostname is usually set when installing the machine, but sometime you need to change it.
To print current hostname
$ hostname
server1.example.com
To temporarily change the hostname.
$ hostname server99.example.com
To permanently change the hostname, edit the /etc/sysconfig/network and set the HOSTNAME property.
$NETWORKING=yes
HOSTNAME=server99.example.com
After saving the configuration, you will need to reboot your machine.
No comments:
Post a Comment