Change Color for Bash Prompt - Raspberry Pi

From ETCwiki
Revision as of 18:13, 24 July 2015 by Ddxfish (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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