Change Bash-3.00 Prompt

darren kirby bulliver at badcomputer.org
Sun Dec 19 19:19:53 PST 2004


quoth the Adam:
> I installed bash shell and now my prompt says "bash-3.00#"
>
> How do I change the text before the #?  I'd like it to say bash# instead of
> bash-3.00#.
>
> Thanks
>
Bash prompt is created from the env variable "PS1" If really all you want is 
"bash#" then try:
$ export PS1="bash$ "
to make it permanent, add to (or edit) one of your bash startup files, 
probably /etc/profile for systemwide, or ~/.bashrc for users

I like a bit more info in my prompt, so I use:
PS1="\[\033[0;31m\][$(date +%H:%M)][\u@\h \W]#\[\033[0m\]"

-d
-- 
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20041219/6cc66ccf/attachment.bin


More information about the freebsd-questions mailing list