Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 01-21-2005, 04:34 PM   #1
LQ Newbie
Registered: Jun 2004
Posts: 4

Rep: Reputation: 0
How do I "rename" my computer?

Currently my login screen for gnome says "Welcome to [IP Address]". Well, frankly I think that looks awful so I was wondering if there was a way to change the IP Address part to say something else like "Universe" or "Merovinigian". Thanks for the help!!!
Old 01-21-2005, 04:36 PM   #2
Senior Member
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
look at the file in the etc folder called hostname and change it according to your own wishes.
Old 01-21-2005, 04:41 PM   #3
Registered: Apr 2004
Location: TN
Distribution: Only used RH but have heard good things about Mandrake. BSD might be interesting.
Posts: 46

Rep: Reputation: 15
i believe the previous response is essentially correct, but the file name on Fedora is /etc/hosts. leave the localhost line intact and add a new line following the format.
Old 01-21-2005, 04:51 PM   #4
Registered: Aug 2002
Posts: 24,733

Rep: Reputation: 5596Reputation: 5596Reputation: 5596Reputation: 5596Reputation: 5596Reputation: 5596Reputation: 5596Reputation: 5596Reputation: 5596Reputation: 5596Reputation: 5596
The /etc/hosts file resolves names to IP addresses.

Which file used to store the hostname AFAIK depends on the distribution but look at the /etc/sysconfig/network file. If it exists there will be an entry hostname= change that value as desired.

The command hostname will also change the hostname but does not save it.
Old 01-21-2005, 05:11 PM   #5
Registered: Jan 2005
Distribution: Solaris, Linux Fedora Core 6
Posts: 170

Rep: Reputation: 30
Originally posted by michaelk
The command hostname will also change the hostname but does not save it.
You could put it into /etc/rc.local so that it will run every boot.
Old 01-21-2005, 06:34 PM   #6
Senior Member
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
You could put it into /etc/rc.local so that it will run every boot.
Michaelk's suggestion is more appropriate as you don't want to bandaide a problem when you can just fix it right at the source.

Old 01-21-2005, 06:45 PM   #7
LQ Newbie
Registered: Jun 2004
Posts: 4

Original Poster
Rep: Reputation: 0
OK, it turns out that I had to edit both the /etc/hosts amd /etc/sysconfig/network files. At first I simply edited the network file and the name shown on the login screen did change to Merovingian, but then when I loaded Gnome I got a warning that Gnome didn't have a network address for Merovingian so some programs may not function correctly. I had looked in the hosts file and seen that it looked like was being assigned to localhost, so I just used the same format to assign to Merovingian and everything seems to work now. Below are posts of these files. Please let me know if they look correct.

The /etc/hosts file:

# Do not remove the following line, or various programs
# that require network functionality will fail. localhost.localdomain localhost localhost.localdomain Merovingian

The /etc/sysconfig/network file:


Thanks in advance for anymore advice!!!
Old 01-21-2005, 06:47 PM   #8
Registered: Jan 2004
Location: /lost+found
Distribution: Slackware 14.2
Posts: 849

Rep: Reputation: 33
marghorp is correct. You want to edit your /etc/HOSTNAME file.
Old 01-21-2005, 07:27 PM   #9
Senior Member
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
Take a look at

for the solution that works for me.


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 03:07 PM
rename file with "mv" not working for folder? Niceman2005 Linux - Newbie 2 03-13-2005 09:34 PM
Lost DHCP Lease when putting computer in "Standby" mode for a "long" time pnellesen Linux - Networking 1 01-06-2005 11:44 PM
wildcards with the "rename" command mattn Linux - General 3 05-13-2004 07:43 PM
"Edit and rename swaret conf" or whatever. PROBLEM! Kjetil4455 Slackware 8 04-14-2004 03:00 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:51 PM.

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
Open Source Consulting | Domain Registration