Add color to your bash prompt

429 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
Example:

nano ~/.bashrc

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

#force_color_prompt=yes

Like this:

force_color_prompt=yes

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

wikiubuntusers

Find more posts onĀ https://notposted.com

Total 0 Votes
0

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 *