Become root, save hostname in /etc/hostname and tell the hostname
command to read the name from the file.
Here are the commands to do the same
% su
% echo your_hostname > /etc/hostname
% hostname -F /etc/hostname
However, on next reboot, hostname will be lost.
On Red Hat / centOS, edit HOSTNAME= entry of the file
/etc/sysconfig/network
This sets up the hostname permanently.
No comments:
Post a Comment