Friday 19 November 2010

Add color to Bash prompt symbols

This is actually pretty simple. The trick behind is to add this line into "$HOME/.bashrc".

In the terminal:

$ sudo gedit ~/.bashrc

And enter this lines at the end of the file or anywhere really.

# Add color to Bash prompt symbols
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
Save the file and close the terminal. Next time you restart the terminal the bash will be in a different color.

blog comments powered by Disqus