newbie PS1 config question

Telmo Silva tsilva at zmail.pt
Fri Jan 30 00:39:39 UTC 2004


Hi Ko,

Have you set up your hostname in /etc/hostname

if you haven't donw so you can do it by emitting the following command

#echo your hostname > /etc/hostname 

A Qui, 2004-01-29 às 23:35, Ko Pu escreveu:
> >>>prompt question:
> >>>I'm using dsl modem, so the ip address is dynamic, and the prompt showed 
> >>>the ip address, how can I change it to my computer name? I added it to my 
> >>>/etc/host but I still got the ip address. This is what I have in my 
> >>>prompt.
> >>>[kpu at d209-121-129-174 Linux]$
> >>>
> >>>Thanks in advance for your comment/suggestion
> >>>
> >>>Ko Fei Pu
> >>>mailto:ko_pu at nospamhotmail.com
> >>>
> >>>
> >>
> >>I always put the following line in my ~/.bashrc
> >>
> >>	PS1=`echo "("'${PWD}'") "`
> >>
> >>Works for me.
> >>
> >>Greeting, Niels.
> >>
> >>
> >
> >Took me a bit to crunch through that one...
> >
> >It's equivalent to:
> >
> >    PS1='(${PWD})\$ '
> >
> Thanks to all, I got it working, I didn't know that you could use ${PWD}, 
> the doc only mentioned \w or \W. But I still couldn't get rid of the ip 
> address, I would like to replace it with the server name and I replace it in 
> my /etc/sysconfig/network/HOSTNAME, but it still shows, any ideas?
> 
> Thanks in advance for your comment/suggestion
> 
> Ko Fei Pu
> mailto:ko_pu at nospamhotmail.com
> 
> _________________________________________________________________
> High-speed users—be more efficient online with the new MSN Premium Internet 
> Software. http://join.msn.com/?pgmarket=en-us&page=byoa/prem&ST=1
-- 
Telmo Silva <tsilva at zmail.pt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Esta ? uma parte de mensagem	assinada digitalmente
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20040130/9fb7ce4a/attachment-0001.sig>


More information about the fedora-list mailing list