colorize bash prompt?

Posted February 14, 2014 1.9k views
hi, I want to colorize my bash prompt, and added .bash_profile in my home dir (/root): ----8

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

2 answers
To try it first without saving type:
export PS1="\e[0;32m[\u@\h \W]\$ \e[m "

If the color is ok then you can save it to your user's .bashrc typing:
export PS1="\e[0;32m[\u@\h \W]\$ \e[m"

thanks ricardo!
it works!!!
Submit an Answer