Changing the BASH Prompt
Accidentally posted this in the general forum, meant to post it here.
Hi, Fairly new to Linux here. I would like to change my BASH prompt to the full path followed by the $. When I add the line: export PS1="[\w] \$ " in my .bashrc file in my home directory, my prompt displays as: [~] $ To see if maybe I was not putting the right information in the export line, I tried a couple more escape characters. export PS1="[\d] \$ " displayed: [Sun Mar 28] $ export PS1="[\W] \$ " displayed: [pete] $ Here is my entire .bashrc file: # .bashrc # User specific aliases and functions # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi export PS1="[\w] \$ " And here is the value of my BASH_VERSION environment variable: 2.05b.0(1)-release Does anyone know if the \w was deprecated? If I have not provided enough information, please let me know Any help would be appreciated, Thanks Pete |
It's all good, you just coincidently happen
to be in your home directory, which, in the shells abbriviations, is ~ ... try a cd /usr ;) Cheers, Tink |
DOH! lol.
Thanks Tink |
Pleasure mate :}
And sorry, I didn't welcome you! Welcome to LQ, I usually don't overlook the post-number :} Cheers, Tink |
I always find this site useful:
Prompt Magic |
All times are GMT -5. The time now is 04:43 AM. |