-   Linux - Newbie (
-   -   name change in /etc/hosts and reboot doesnt change name (

aussieaubs 06-25-2009 10:33 PM

name change in /etc/hosts and reboot doesnt change name
hi ive changed my /etc/hosts file to a new name and when i reboot Centos 5.3 the logon splash screen still shows the old machine name. I followed the existing format of the hsots file to change the name to a new name??

is /etc/hosts the only place to change the host name?


Tinkster 06-25-2009 10:40 PM

Nope, it's not. That's just for a mapping of names to IPs if
they're not in DNS.

To change the hostname edit /etc/sysconfig/network


vap16oct1984 06-25-2009 10:44 PM

TO change he host name u have to follow three steps
1)put the entry in /etc/hosts
2)put the entry in /etc/sysconig/network
3)run this command hostname with giving new hostname for example: if u have new hostname like
then rum this command

rkski 06-25-2009 10:57 PM


I'm running CentOS too, the correct place to change it is in /etc/sysconfig/network.

vap16oct1984 06-25-2009 11:09 PM

Yes its for permanent.

For tempory perpose just run the commant
#hostname new_hostname

farslayer 06-26-2009 09:40 AM

Take a look at my Blog post about Changing the Linux hostname..

how to check it, How to change it, how to do it all on the fly without need for a reboot..

props to the cpqlinux site for the info

All times are GMT -5. The time now is 10:33 PM.