Add color to your bash prompt

364 0

Follow these steps to add these colors to your bash prompt.

Here is how you can add some color in your bash prompt.

Use your text editor of choice to open ~/.bashrc file

nano ~/.bashrc

Look for the following line and uncomment the line by removing the # symbol.


Like this:


Add the following line at the bottom

PS1='\[\033[1;36m\]\u\[\033[1;31m\]@\[\033[1;32m\]\h:\[\033[1;35m\]\w\[\033[1;31m\]\$\[\033[0m\] '

Finally, save and close the file and restart the bash by running this:

source ~/.bashrc

You should now have the same color palette as in my picture above. Here are some helpful links on creating your own color scheme.

EZ Bash PS1 generator


Find more posts onĀ

Total 0 Votes

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

About The Author

Coolest hedgehog in town!

No Comments on "Add color to your bash prompt"

Leave a Comment

Your email address will not be published. Required fields are marked *