colorize bash prompt?

February 14, 2014 1.8k views
hi, I want to colorize my bash prompt, and added .bash_profile in my home dir (/root): ----8
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!!!
Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!