LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-13-2002, 03:56 PM   #1
AMDPwred
Member
 
Registered: Dec 2001
Location: Richmond, VA
Posts: 391

Rep: Reputation: 30
How do I change the name of my box?


Example, when I'm in the console, it looks like this.

Code:
[root@localhost /root]#
How can I change the box name from localhost to something different?
 
Old 09-13-2002, 04:03 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
use the hostname command. and this was asked a week ago, try searching for some other answers, cheers.
 
Old 09-13-2002, 04:11 PM   #3
AMDPwred
Member
 
Registered: Dec 2001
Location: Richmond, VA
Posts: 391

Original Poster
Rep: Reputation: 30
In reading hostname --help, I found...

Code:
   This command can read or set the hostname or the NIS domainname. You can
   also read the DNS domain or the FQDN (fully qualified domain name).
   Unless you are using bind or NIS for host lookups you can change the
   FQDN (Fully Qualified Domain Name) and the DNS domain name (which is
   part of the FQDN) in the /etc/hosts file.
In the /etc/hosts file, can I just change the name there? Will that have any negative effects on my system?
 
Old 09-13-2002, 04:24 PM   #4
AMDPwred
Member
 
Registered: Dec 2001
Location: Richmond, VA
Posts: 391

Original Poster
Rep: Reputation: 30
Nevermind, I just changed it by:

Code:
hostname Jupiter
Thanks for your help.
 
Old 09-14-2002, 04:26 AM   #5
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
the hostname command will change the machine until it reboots, then it will set it from one of a number of different files depending on distro. What you're looking for if you're running RedHat is /etc/sysconfig/network

Cheers,

Finegan
 
Old 11-23-2002, 10:39 AM   #6
bladewalker
Member
 
Registered: Nov 2002
Location: UK
Distribution: Redhat 8
Posts: 30

Rep: Reputation: 15
Delete me

Tried to delete this post - can't can a moderator delete this one plz

Last edited by bladewalker; 11-23-2002 at 11:56 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
Can I set ssh to change my konsole colours when I connect to a remote box? davee Linux - General 2 12-16-2004 03:56 PM
Change Boot Options on MY bOx tiredoflogins Linux - Newbie 4 10-18-2004 05:58 AM
XP Box won't connect to internet thru RH9 Box (firewall/dhcpd), it can only ping fire Rhapsodic Linux - Networking 4 07-10-2004 04:02 PM
Samba: Change Linux box Computer Name Gman22 Linux - Software 5 08-13-2003 04:19 PM
how to change rh 9 box from localhost to something else izibo Linux - Networking 5 07-20-2003 08:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:45 PM.

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