LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Prompt (https://www.linuxquestions.org/questions/linux-newbie-8/prompt-11328/)

Atroxic 01-08-2002 01:43 AM

Prompt
 
My Prompt somehow changed to "bash-2.05$", I did once have it as "[Atroxic@blah folder]". How do I change it back?

da Perp 01-08-2002 01:48 AM

edit your .bash_profile file with this line:
PS1="(/u@/W):"

the prompt will look more lik this then :
(user@workingdir):

Atroxic 01-08-2002 02:08 AM

Thanks, but where do I find the file? What directory?

hanzerik 01-08-2002 07:03 AM

it's in your home dir ie /home/<username>
it's a hidden file so you cant see it with ls, you'll have to do ls -al to see hidden files.

bluecadet 01-08-2002 07:37 AM

the actual preoper pattern you should use is:

PS1='[\u@\h \W]\$ '

da Perp 01-09-2002 04:43 AM

oops!sorry bout that,blue is right! \ instead of /...
type from anywhere vi ~/.bash_profile.
add the ps1 line to the bottom. it's also usually better
to use double quotations instead od single, because when you start adding options and variables to the prompt bash gets easily
confused with single quotes.


All times are GMT -5. The time now is 12:23 AM.