Mac OS X, how do I set the bash shell prompt (PS1) that every time the user type
sudo su (root mode) the shell prompt change from the standard color to the red color and of course if the user exit from the root mode the color revert back to the default color. Basically what I am trying to do, is to warning the user that he/she is in root mode, so be careful.
I know I can put the following line
PS1="\e[0;31m[\u@\h \W]\$ \e[m " inside the user personal
.bash_profile but I guess this is not the correct approach.