LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-25-2009, 09:33 PM   #1
aussieaubs
LQ Newbie
 
Registered: Oct 2003
Location: Vic, Australia
Posts: 5

Rep: Reputation: 0
Thumbs up 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
 
Old 06-25-2009, 09:40 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 06-25-2009, 09:44 PM   #3
vap16oct1984
Member
 
Registered: Jun 2009
Location: INDIA
Distribution: RHEL-5
Posts: 174
Blog Entries: 3

Rep: Reputation: 38
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
 
Old 06-25-2009, 09:57 PM   #4
rkski
Member
 
Registered: Jan 2009
Location: Canada
Distribution: CentOS 6.3, Fedora 17
Posts: 247

Rep: Reputation: 51
Hi,

I'm running CentOS too, the correct place to change it is in /etc/sysconfig/network.
 
Old 06-25-2009, 10:09 PM   #5
vap16oct1984
Member
 
Registered: Jun 2009
Location: INDIA
Distribution: RHEL-5
Posts: 174
Blog Entries: 3

Rep: Reputation: 38
Yes its for permanent.

For tempory perpose just run the commant
#hostname new_hostname
 
Old 06-26-2009, 08:40 AM   #6
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fbset doesnt change anything and breaks console tommytomthms5 Linux - Newbie 2 07-12-2008 12:15 AM
script to update /etc/hosts on dhcp obtained ip change. juanctes Linux - General 1 02-02-2008 09:17 AM
updating the change of /etc/hosts.deny in AIX 4.3.3 zepplin611 AIX 7 07-18-2004 02:31 PM
cd ..' doesnt change first 5 lines on screen slackwarefan Linux - Software 2 10-21-2003 01:22 PM
Resolution doesnt change twin Linux - Newbie 4 09-25-2003 02:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration