Pretty PS1 Prompt for Bash
To use this put it in ~/.bashrc, or for it to apply systemwide, in /etc/profile
if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ] && [ -n "$PS1" ] then if [ `/usr/bin/whoami` = 'root' ] then export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]' else export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]' fi fi
Updated: It's now more concise and functionally more sensible.