bashterminaliterm

change color of prompt in bash profile


I am trying to change the color of the prompt in my terminal to green text for the user at the start and white ~

Currently my .bash_profile file is configured the following way to provide a yellow color for the user name and a pink color for the ~

PS1='\e[33;1m\u@\h: \e[31m\W\e[0m\$'

Does anyone know how to modify the above to change to the colors to green and white?


Solution

  • PS1='\e[32;1m\u@\h: \e[37m\W\e[0m\$'
    

    The numbers after the [ are the color codes. See this reference.