[CentOS] Changing hostname?

Sat Sep 13 06:06:46 UTC 2008
Niki Kovacs <contact at kikinovak.net>


I recently made a CentOS install on a machine with an unsupported 
network card. I had to add the driver for it later, once I finished the 
install. For now I have this:

[kikinovak at localhost ~]$ hostname --fqdn

Q: how would I change this to something like calimero.local?

Here's what I *would* do, but I prefer to ask before.

1) edit /etc/sysconfig/network and edit this line:


2) add a line to /etc/hosts like this:

# Do not remove the following line, or various programs
# that require network functionality will fail.       localhost.localdomain   localhost	calimero.local		calimero
::1     localhost6.localdomain6 localhost6

Please correct me if I'm wrong.


Niki Kovacs