Change Konsole's prompt

Hi all,

Probably a frivolous question, but, is there a way to have the ‘$’ as prompt in the Konsole/shell? It currently has ‘>’. Or is this normal for bash?

TIA

Hi
Set the PS1 environment variable;


export PS1="\\e[32;1m\]\u@\h:\w$\\e[0m\] "

If it’s what you want, then add to your ~/.bashrc file (note you don’t need the export bit).

See more at;

http://misc.flogisoft.com/bash/tip_colors_and_formatting

You can even add emoticons these days as well…

Currently by default,
The two command prompts you describe happen to denote whether you are logged in as root or as a normal User.

Recommend you don’t modify those…

You can test for yourself… open a normal user console and your prompt will be “>”
“su” to root, and watch the prompt change to “$”

TSU

and for dummies like me: http://bashrcgenerator.com/
It’s really easy!! :slight_smile:

Here on oS 13.2 and earlier it’s always been “#”. Did it change in Leap?

Just for sake of completeness, I’ve seen many examples in books and internet tutorials where the user prompt is “$”, as the OP likes.

This.

Learning Linux with a book right now and their prompt for normal users is always $, and I wanted consistency. I can get the $ prompt if I use the sh shell, but I’d rather just bash. It’s just that the ‘>’ looks too Windowsy for me. :stuck_out_tongue:

Thanks for all the replies, and sorry for not replying earlier myself, but when I saw the first replies and visited the linked pages I was blown away by all that code, variables and whatnot. Now I can understand things a wee bit better. Thanks again.