Saturday, July 16, 2016

How to change bash prompt to red when you are root

To change your bash shell prompt to red when you became root,  do the following:

  • login as root
  • vi ~/.bashrc
  • add the this line:  export PS1='\[\e[31m\][root]\[\e[0m\] \W\$'
 That's it!

No comments:

Post a Comment

Your comment will be visible after approval.