LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-20-2003, 09:42 PM   #1
Underworld
Member
 
Registered: Jul 2003
Distribution: Microsoft Linux distro.
Posts: 48

Rep: Reputation: 15
Host (computer) name change?


I bought The Linux Cookbook by Michael Stutz.

dsl.org/cookbook

Anyways, it says to change the computer name type the command /etc/hostname
I'm running RH9 and it says theres no such file.

So how the heck do i change my computer name from Localhost.Localdomain to ..........UNDERWORLD!?
 
Old 07-20-2003, 09:55 PM   #2
Drogo
Member
 
Registered: Oct 2002
Distribution: RedHat 8 or 9 (shrike)- Fedora Core 1,2
Posts: 215

Rep: Reputation: 30
it should be there

/etc/hosts
 
Old 07-20-2003, 09:58 PM   #3
Underworld
Member
 
Registered: Jul 2003
Distribution: Microsoft Linux distro.
Posts: 48

Original Poster
Rep: Reputation: 15
oh yea that file was there. do i just delete the word localhost and replace it with what i want?
 
Old 07-20-2003, 10:00 PM   #4
Drogo
Member
 
Registered: Oct 2002
Distribution: RedHat 8 or 9 (shrike)- Fedora Core 1,2
Posts: 215

Rep: Reputation: 30
Mine looks like this

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 UNDERWORLD localhost.localdomain localhost
 
Old 07-20-2003, 10:02 PM   #5
Underworld
Member
 
Registered: Jul 2003
Distribution: Microsoft Linux distro.
Posts: 48

Original Poster
Rep: Reputation: 15
Oh, cool, thanks man.
 
Old 07-20-2003, 10:03 PM   #6
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
had to change both these files for rh 7.3 - my computer name is Tron

/etc/sysconfig/network

Code:
NETWORKING=yes
HOSTNAME=Tron
/etc/hosts

Code:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1	localhost.localdomain	localhost	Tron
 
Old 07-22-2003, 12:35 AM   #7
evy
LQ Newbie
 
Registered: Jul 2003
Posts: 3

Rep: Reputation: 0
To check if it is correctly set, use the /bin/hostame command. It should return the hostname. If not, use it to set your hostname : #hostname ServerName
 
Old 07-22-2003, 03:26 AM   #8
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
You should tell Michael Stutz that by default their are no executable files in the /etc directory. It mostly deals with configuration files. Must be a typo.
 
Old 07-22-2003, 05:00 AM   #9
Kahless
Member
 
Registered: Jul 2003
Location: Pennsylvainia
Distribution: Slackware / Debian / *Ubuntu / Opensuse / Solaris uname: Brian Cooney
Posts: 503

Rep: Reputation: 30
I love you guys.....

ive had the same problem, and using the GUI to fix it (there is a tool for it) broke apache.

I did what megaspaz said, and it fixed everything (althought i had to reboot, im assuming restarting the network and logging out and back in would have worked too)


I will add a comment since chances are its your first time using linux, use emacss to edit the files

emaces /etc/sysconfig/network

emaces /etc/hosts

to save the changes to the files, typ:e control+x control+c y enter.


(assuming you are messing with this for the first time, you may have needed that, if not, sorry for insulting you)
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Host Name Change ? apocolpse Linux - Newbie 3 04-12-2005 12:27 PM
telnet <host> 135 to a windows computer sporadic235 Linux - Security 1 06-18-2004 12:28 PM
How to host two websites on one computer klintonray Linux - Software 8 07-23-2003 03:19 PM
Help! Locked myself out of my computer with Netconfig Host Login OldManTrue Linux - Networking 2 06-17-2003 08:26 PM
how do you change the host name? Culbert Linux - Software 3 03-15-2003 01:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:23 AM.

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