Command prompt colours
Apr 16th, 2008 by Forbes Guthrie
Here’s an old trick which works great on ESX servers (thanks to this article on Linux Journal for reminding me). It turns your prompt different colours to highlight when you are logged in as root:
To make the prompt red when you’re running as root add this to /root/.bashrc:
PS1=”\[\e[31m\]\u@\h:\w#\[\e[m\] “
To make the prompt green when running as a normal user add this to ~/.bashrc:
PS1=”\[\e[32m\]\u@\h:\w\$\[\e[m\] “



This is a nice tip, just gives you a heads up with out much thought as to where you are and the potential for your cmd line inputs. not to mention, quicker admins make more money, lol… wait, what?