[CentOS] hostname changes

Mon Jun 15 18:25:01 UTC 2009
Tom Brown <tom at ng23.net>

>
>
> How do I change the hostname?
> In particular, what is the difference between /etc/hosts and 
> /etc/sysconfig/network files? Where should I make the changes?
>

/etc/hosts has nothing to do with the hostname this is just a way to 
resolve a name to an IP where DNS is not available or some other badness 
is going on

hostname is set in /etc/sysconfig/network but if you want to change it 
on the fly you can also echo it into /proc/sys/kernel/hostname