Follow these steps to add these colors to your bash prompt.
![bash](https://notposted.com/wp-content/uploads/2022/06/bash-150x19.png)
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.
Find more posts onĀ https://notposted.com
Total 0 Votes
0
0
No Comments on "Add color to your bash prompt"