Temporary
# hostname <new-hostname>
Permanent
In the file /etc/sysconfig/network, change the value of the variable HOSTNAME.
# vi /etc/sysconfig/network
HOSTNAME=<new-hostname>
Then, restart the network service.
# service network restart
Check if the hostname has changed by running the hostname command:
# hostname
If that does not work, try and reboot the machine.
No comments:
Post a Comment