On Tue, May 07, 2002, Eliran wrote about "Nicknames for my Hostname":
> 'eliran', pinging 'eliran' (ping eliran) works fine but why does the shell bash 
>keeps telling me it's 'localhost' (I set PS1="\h\$ " but it still keeps
> showing me localhost).
> 
> Here is my /etc/hosts after adding a 'eliran' to the begining.
>..
> Are there other places which I should set this ?

/etc/hosts has nothing to do with the host name the shell reports.

The kernel keeps track of a "host name" returned by commands like "uname -n"
or "hostname", and also by your shell. You set it with the "hostname" command
too: "hostname eliran".

However, the effect of the "hostname" command is only until the next reboot.
Each distribution should have some init file that reads the host name from
a file and sets it with "hostname" - in RedHat the file you should edit
is /etc/sysconfig/network (the variable HOSTNAME). Or just use linuxconf.

-- 
Nadav Har'El                        |       Tuesday, May 7 2002, 26 Iyyar 5762
[EMAIL PROTECTED]             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |He who has more is not happier than he
http://nadav.harel.org.il           |who wants less.

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to