Page 2 of 2

Posted: Fri 10 Apr 2020, 15:34
by steve_s
rockedge wrote:go to hidden file ->

/root/.bashrc and open it in geany and look for this line :

Code: Select all

PS1="\[\e]2;\w\a\e[34m\]$USER\\$ \[\e[0m\]"
now if one would change the '34m' to '32m' "root" will be green! there is a chart somewhere that details the number value that corresponds to the color and change to

Code: Select all

PS1="\[\e]2;\w\a\e[32m\]$USER\\$ \[\e[0m\]"
and the blue will be green

Code: Select all

Black 0;30
Blue 0;34
Green 0;32
Cyan 0;36
Red 0;31
Purple 0;35
Brown 0;33
[Note: Replace 0 with 1 for dark color]
save it and open a terminal to test

anything in the 'PS1=' will modify the terminal command prompt. Look up the .bashrc and the PS1= for further details on the syntax
https://www.thegeekstuff.com/2008/09/ba ... ina-jolie/ is one example.
That's it! Awesome! such a little thing, it would have taken me forever...well done and thanks!

Posted: Fri 10 Apr 2020, 15:37
by steve_s
Now!

Posted: Fri 10 Apr 2020, 21:27
by Mike Walsh
Indeed, thanks for that, rockedge. I've been wanting to do something with that for long enough.....my preferred set-up being gold text on a dark blue background, with a blinking red underscore cursor.

Now, it works nicely, with "root #" being in (36m_cyan) instead. Sweet..! :D


Mike. :wink: