newbie PS1 config question
Ko Pu
ko_pu at hotmail.com
Thu Jan 29 23:35:58 UTC 2004
>>>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 usersbe more efficient online with the new MSN Premium Internet
Software. http://join.msn.com/?pgmarket=en-us&page=byoa/prem&ST=1
More information about the fedora-list
mailing list