You are not logged in or registered. Please login or register to use the full functionality of this board...



Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to change your bash prompt color
07-07-2011, 07:14 PM
Post: #1
how to change your bash prompt color
Type the following command:

Code:
export PS1="\e[0;31m[\u@\h \\W]\\$\e[m"


Where 0;31 is the colour number.

List of Color codes

Black 0;30
Blue 0;34
Green 0;32
Cyan 0;36
Red 0;31
Purple 0;35
Brown 0;33
Blue 0;34
Green 0;32
Cyan 0;36
Red 0;31
Purple 0;35
Brown 0;33

Replace digit 0 with 1 to get light color version.

To make the colour permanent do the following:

Code:
nano .bash_profile


Append
Code:
export PS1="\e[0;31m[\u@\h \\W]\\$\e[m"
to the file and save.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)