Difference between revisions of "Change Color for Bash Prompt - Raspberry Pi"

From ETCwiki
Jump to navigationJump to search
 
 
Line 12: Line 12:
 
==External Links==
 
==External Links==
 
*[http://ezprompt.net/ Bash Prompt Generator] - Great visual tool to click and drop yourself a new bash prompt
 
*[http://ezprompt.net/ Bash Prompt Generator] - Great visual tool to click and drop yourself a new bash prompt
 +
[[Category:Raspberry Pi]]

Latest revision as of 18:13, 24 July 2015

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