Change Color for Bash Prompt - Raspberry Pi

From ETCwiki
Jump to navigationJump to search

If you want to customize the type and color of command prompt you have, try this method to change colors for root:

Note: This was tested on Raspbian (debian) but should work on Ubuntu and Mint, as well as others.

change prompt color

  • Open /root/.bashrc
  • Make this line at the bottom of the document
    You will get something like this
export PS1="\[\e[31m\]\u\[\e[m\]\[\e[36m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\] - \[\e[35m\]\w\[\e[m\] "

Now log out and log back in.

External Links