On Mon, Jun 15, 2009 at 7:51 PM, Carlos Santananeubyr@gmail.com wrote:
Howdy,
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?
Thanks, CS.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
You should change it in both places, and then run /etc/init.d/network restart to make it effective.
/etc/hosts basically tells your own machine on which IP a certain domain resolves to. It's a "scaled down DNS server", and normally only used if you only need to maintain a few hosts on a network.
/etc/sysconfig/network tells your machine what it's actual hostname is.