Change Host Name
This applies to Fedora/Red Hat systems.
The host name is set during boot in the file /etc/rc.sysinit. In what follows, .yourdomain refers to a domain you own. If you don't own a domain, use .localdomain instead. Also the word yourhost refers to the host name you want to use.
Edit /etc/sysconfig/network. This file is sourced by the script in /etc/rc.sysinit.
Set the variable HOSTNAME to your host name.
Example:
HOSTNAME=yourhost.yourdomain
See /usr/share/doc/initscripts-*/sysconfig.txt
Edit /etc/hosts.
The format of this file is:
Edit the line begining with 127.0.0.1; add the long and short versions of your host name to the end.
Example:
127.0.0.1 localhost.localdomain localhost yourhost.yourdomain yourhost
See man 5 hosts
Reboot.
No comments:
Post a Comment