LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 01-14-2004, 10:00 PM   #1
Kramer
Member
 
Registered: Aug 2003
Location: Somewhere south of sanity...
Distribution: Mandrake 9.1
Posts: 550

Rep: Reputation: 30
How can I change the host name?


To something other than LocalHost?
 
Old 01-14-2004, 10:02 PM   #2
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
go to your hosts file /etc/hosts and change the name localhost to whatever
 
Old 01-14-2004, 10:43 PM   #3
chrisk5527
Member
 
Registered: Oct 2002
Location: Michigan
Distribution: Slackware Linux 10.0
Posts: 289

Rep: Reputation: 30
Actually, you might want to keep the line that says localhost. Just add another line below it that specifies a non-loop-back IP address such as 192.168.0.1 not 127.0.0.1

For example

127.0.0.1 localhost
192.168.0.1 server server.domain.org

Good Luck.
 
Old 01-14-2004, 10:48 PM   #4
Kramer
Member
 
Registered: Aug 2003
Location: Somewhere south of sanity...
Distribution: Mandrake 9.1
Posts: 550

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by chrisk5527
Actually, you might want to keep the line that says localhost. Just add another line below it that specifies a non-loop-back IP address such as 192.168.0.1 not 127.0.0.1

For example

127.0.0.1 localhost
192.168.0.1 server server.domain.org

Good Luck.
Are you talking about the one thats in the command prompt? Thats the one that I want to change.
 
Old 01-14-2004, 10:54 PM   #5
chrisk5527
Member
 
Registered: Oct 2002
Location: Michigan
Distribution: Slackware Linux 10.0
Posts: 289

Rep: Reputation: 30
Take a look at this link. I'll show you how to customize your command prompt.

http://www.linuxlookup.com/html/arti...m-prompts.html

Good Luck.
 
Old 01-14-2004, 11:14 PM   #6
Kramer
Member
 
Registered: Aug 2003
Location: Somewhere south of sanity...
Distribution: Mandrake 9.1
Posts: 550

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by chrisk5527
Take a look at this link. I'll show you how to customize your command prompt.

http://www.linuxlookup.com/html/arti...m-prompts.html

Good Luck.

I really want to know how to change it in Gkrellm, but I cant get it to change for some reason
 
Old 01-15-2004, 07:36 AM   #7
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
just type at command prompt
hostname newhostname
 
Old 01-15-2004, 08:25 AM   #8
dishawjp
Member
 
Registered: Dec 2003
Location: Central New York
Distribution: RH/Fedora/SUSE
Posts: 64

Rep: Reputation: 15
There are a couple of steps involved.

For example if you want to name your computer "newhostname":

1) Edit your /etc/sysconfig/network file and change localhost in the HOSTNAME= line to newhostname or whatever you want to name it.

2) Edit your /etc/hosts file to include the new hostname there. If you have a network, add it to your 192.168.whatever line, or otherwise just append it to the 127.0.0.1 line. Be sure to add both newhostname and newhostname.localhost

3) then from the command prompt you may type"

hostname newhostname

or just reboot.

HTH & have fun!

Jim Dishaw

Last edited by dishawjp; 01-15-2004 at 08:29 AM.
 
  


Reply


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
How do I change Host Name intels_ss Linux - Newbie 4 07-25-2005 07:26 PM
how to change host name? gobi_dgm Linux - Newbie 6 05-01-2005 12:34 AM
Host Name Change ? apocolpse Linux - Newbie 3 04-12-2005 11:27 AM
how do i change my host name? jsmarshall85 Debian 7 10-19-2004 03:04 PM
how do you change the host name? Culbert Linux - Software 3 03-15-2003 12:09 PM


All times are GMT -5. The time now is 05:12 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration