PS1 colors

Feb 14
2009

I like to see green prompt for userid > 0 and red for root, also the hostname and the history number of a command.

PS1="\[\e[32;1m\]\u\[\e[30;1m\]@\[\e[32;1m\]\H[\!]\W\[\e[30;1m\]\\$\[\e[0m\]"
PS1="\[\e[32;1m\]\u\[\e[30;1m\]@\[\e[32;1m\]\H[\!]\W\[\e[30;1m\]\\$\[\e[0m\]"

Comments are closed.

Calendar

February 2009
M T W T F S S
« Jan   Mar »
 1
2345678
9101112131415
16171819202122
232425262728  

Tags