Tuesday, March 1, 2016

customize bash prompt color


change the color of the bash terminal string: 

export PS1="\e[0;32m[\u@\h \W]\$ \e[m"

[updated]
export PS1="\[\e[0;32m\]\u@\h:\W\$ \[\e[0m\]"

set the above in ~/.bashrc file.

0;32 -> green color


more here:
http://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/


No comments:

Post a Comment