Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 03-12-2004, 08:07 PM   #1
LQ Newbie
Registered: Jun 2003
Posts: 11

Rep: Reputation: 0
How to make change in hostname

I am currently running RedHat 9. When I did the initial install I accidently gave it the wrong host name and need to change it. As root I have typed hostname redhat9. That changes it until I reboot then the incorrect one comes back. In the startup messages I see a message where it sets to host name to the incorrect name very early in the startup.

Where is it getting the old name at startup and how do I change it. I guess I can put a line in rc.local but there should be a better way.
Old 03-12-2004, 08:20 PM   #2
Registered: May 2003
Location: Cambridge, MA
Distribution: SuSE, RedHat, and OpenBSD
Posts: 116

Rep: Reputation: 15
Edit the file /etc/hosts as root.
Old 03-12-2004, 08:21 PM   #3
LQ Addict
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
not sure about SuSE it's stored in /etc/HOSTNAME
Old 03-12-2004, 10:05 PM   #4
LQ Newbie
Registered: Jun 2003
Posts: 11

Original Poster
Rep: Reputation: 0
I have edited the hosts table -- it shows the correct name. I have also edited the hostname table with the correct name. The hosts table remains intact, the entry in the hostname table doesn't survive startup. Both of these tables involve networking, the change is made before the network is started.
Old 03-12-2004, 11:24 PM   #5
Senior Member
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
In Redhat, you can bring up a small GUI tool with the command:redhat-config-network . Under the DNS tab, you can change the hostname.
Also, you can change that by editing the file /etc/sysconfig/network.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change Hostname? Micky2k4 Linux - Newbie 3 09-08-2004 01:09 PM
How to change hostname oldoldcat Linux - General 14 02-06-2004 12:48 AM
Hostname change AttOMIXT Linux - Newbie 2 11-02-2003 12:10 AM
hostname change campo Linux - Networking 9 02-06-2003 04:41 PM
change hostname kafnir Linux - Networking 1 10-21-2002 12:10 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:21 AM.

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