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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-21-2005, 04:34 PM
|
#1
|
LQ Newbie
Registered: Jun 2004
Posts: 4
Rep:
|
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!!!
|
|
|
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:
|
look at the file in the etc folder called hostname and change it according to your own wishes.
|
|
|
01-21-2005, 04:41 PM
|
#3
|
Member
Registered: Apr 2004
Location: TN
Distribution: Only used RH but have heard good things about Mandrake. BSD might be interesting.
Posts: 46
Rep:
|
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.
|
|
|
01-21-2005, 04:51 PM
|
#4
|
Moderator
Registered: Aug 2002
Posts: 26,201
|
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.
|
|
|
01-21-2005, 05:11 PM
|
#5
|
Member
Registered: Jan 2005
Distribution: Solaris, Linux Fedora Core 6
Posts: 170
Rep:
|
Quote:
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.
|
|
|
01-21-2005, 06:34 PM
|
#6
|
Senior Member
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440
Rep:
|
Code:
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.
-twantrd
|
|
|
01-21-2005, 06:45 PM
|
#7
|
LQ Newbie
Registered: Jun 2004
Posts: 4
Original Poster
Rep:
|
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 127.0.0.1 was being assigned to localhost, so I just used the same format to assign 127.0.0.1 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.
127.0.0.1 localhost.localdomain localhost
127.0.0.1 localhost.localdomain Merovingian
The /etc/sysconfig/network file:
NETWORKING=yes
#HOSTNAME=localhost.localdomain
HOSTNAME=Merovingian
Thanks in advance for anymore advice!!!
|
|
|
01-21-2005, 06:47 PM
|
#8
|
Member
Registered: Jan 2004
Location: /lost+found
Distribution: Slackware 14.2
Posts: 849
Rep:
|
marghorp is correct. You want to edit your /etc/HOSTNAME file.
|
|
|
01-21-2005, 07:27 PM
|
#9
|
Senior Member
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040
Rep:
|
|
|
|
All times are GMT -5. The time now is 01:31 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|