Friday, December 12, 2008

Color to prompts

http://www.marksanborn.net/linux/adding-color-and-customize-the-bash-prompt-ps1/

Let There be Color

Use your favorite text editor and uncomment the line in .bashrc under the line:

# Comment in the above and uncomment this below for a color prompt
It may look similar to this:

PS1='${debian_chroot:+($debian_chroot)}\[33[01;32m\]\u@\h\[33[00m\]:\[33[01;34m\]\w\[33[00m\]\$ ‘

The code above will give you the same result picture above.
Then save the file and reload your terminal (Use the Linux shortcut ctrl-d and relogin or click your terminal icon)

No comments: