LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   linux prompt(really newbie question) (https://www.linuxquestions.org/questions/linux-newbie-8/linux-prompt-really-newbie-question-213552/)

blackzone 08-04-2004 09:21 PM

linux prompt(really newbie question)
 
my prompt have
root@localhost dirname>

how do I change the "localhost" to some other name?

Tinkster 08-04-2004 09:25 PM

depends on distro, often by editing /etc/HOSTNAME



Cheers,
TInk

m_yates 08-04-2004 09:26 PM

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

btmiller 08-04-2004 10:30 PM

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.

blackzone 08-04-2004 10:34 PM

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"

VeRM69 08-05-2004 12:37 AM

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


All times are GMT -5. The time now is 09:55 PM.