LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   name change in /etc/hosts and reboot doesnt change name (https://www.linuxquestions.org/questions/linux-newbie-8/name-change-in-etc-hosts-and-reboot-doesnt-change-name-735696/)

aussieaubs 06-25-2009 09: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?


TIA
A:study:

Tinkster 06-25-2009 09: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



Cheers,
Tink

vap16oct1984 06-25-2009 09: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 www.linuxtest.com
then rum this command
hostname www.linuxtest.com

rkski 06-25-2009 09:57 PM

Hi,

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

vap16oct1984 06-25-2009 10:09 PM

Yes its for permanent.

For tempory perpose just run the commant
#hostname new_hostname

farslayer 06-26-2009 08:40 AM

Take a look at my Blog post about Changing the Linux hostname..
http://www.linuxquestions.org/blog/f...hostname-1648/

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 03:26 AM.