LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 08-04-2004, 09:21 PM   #1
blackzone
Member
 
Registered: Jun 2004
Posts: 256

Rep: Reputation: 30
linux prompt(really newbie question)


my prompt have
root@localhost dirname>

how do I change the "localhost" to some other name?
 
Old 08-04-2004, 09:25 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
depends on distro, often by editing /etc/HOSTNAME



Cheers,
TInk
 
Old 08-04-2004, 09:26 PM   #3
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,207

Rep: Reputation: 63
Become root by typing "su" and entering the password, then type:
Code:
hostname newname
where newname is the name you want your computer to have
 
Old 08-04-2004, 10:30 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Note that using the hostname command the prompt won't be updated right away. Also, you'll need to put the command into your rc.local file or its moral equivalent to keep it accross reboots.
 
Old 08-04-2004, 10:34 PM   #5
blackzone
Member
 
Registered: Jun 2004
Posts: 256

Original Poster
Rep: Reputation: 30
For redhat 9, the file is stored in /etc/sysconfig/network

When I install redhat 9. The default hostname is "localhost.localdomain"

but my display only shows "root@localhost directory"

why didn't it show "root@localhost.localdomain directory"
 
Old 08-05-2004, 12:37 AM   #6
VeRM69
LQ Newbie
 
Registered: Aug 2004
Location: Gold Coast, Queensland, Australia
Distribution: SuSe 9.1
Posts: 10

Rep: Reputation: 0
Because "Localhost" is your actuall box's name and "localdomain" is the domain you box is on...

So the domain your on, isn't the name of your linux box

it's like my box... my doamin name Susan.somerset.qld.edu.au, but my box name is Susan (coz i'm running Suse 9.1) so mine displays "Susan:/ #" coz susan's my box name

hope that clear's things up a bit

Cheers
dave
 
  


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
Linux newbie question ki11.viru5 Ubuntu 2 11-14-2005 10:36 PM
Linux newbie question..sorry scheung SUSE / openSUSE 1 10-17-2005 09:37 PM
Linux Newbie Question eckertc1 Linux - General 3 03-03-2005 08:16 PM
login prompt question & kde scheme question JustinCoyan Slackware 2 06-09-2004 02:02 PM
$prompt (newbie question) wogga Linux - Software 7 05-31-2004 03:53 PM


All times are GMT -5. The time now is 02:25 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration