[olug] What's the value of your $PS1 variable?

Tim & Alethea Larson thelarsons3 at cox.net
Wed Jan 28 01:18:31 UTC 2009


Adam Haeder wrote:
> or, what does your prompt look like?
> 
> I've started to favor this one:
> 
> \h \@ \u \w \$
> 
> Which makes my prompt look like this:
> 
> proddb02 11:02 AM root /usr/local/bin #
> 
> hostname - time - user - full path
> 
> What does everybody else use?

PS1="\t \[\033[0;33m\]$(uname -s) $(echo $(uname -r) | cut -f1 
-d'-')\[\033[0m\] 
\w\n\[\033[1;33m\]\u\[\033[0m\]@\[\033[0;33m\]\h\[\033[0m\] \!\\$ "

The 0;33 code is yellow.  For root, I use 0;31, which is red.  Changing 
the 0 to 1 makes it bold.  I like the two-line effect, so that the 
prompt stands out even when using a terminal that doesn't display in color.


Tim

-- 
Tim & Alethea
christtrek.org



More information about the OLUG mailing list