Wednesday, May 8, 2024
88
rated 0 times [  88] [ 0]  / answers: 1 / hits: 269678  / 2 Years ago, sat, june 4, 2022, 6:09:01

How can I get the bash to look colored like this?



colored-bash


More From » command-line

 Answers
7

I came up with this solution:




  • open ~/.bashrc in an editor

  • copy this and add it at the end of .bashrc file:



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

  • save the file and restart bashrc:



    source ~/.bashrc



For a full list of available colors and further options look up these links:




[#23436] Sunday, June 5, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
antorchestr

Total Points: 92
Total Questions: 111
Total Answers: 120

Location: Jordan
Member since Wed, Jun 17, 2020
4 Years ago
;