2

I can change the background and text color in Preferences, but there is not an option to change the prompt text color, it's always green! Anyway to change it to red?

Terminal

1

1 Answer 1

0

You can change on palette menu, and find same color that use on your font. But I don't know why ubuntu doesn't make a description of the colors used for fonts in this menu.

See this image:

enter image description here

But the above method is not right, because it can replace other colors associated with setting the palette.

Maybe you can edit the .bashrc file at home: - Open the .bashrc file, look for it (ctrl + f) #force_color_prompt=yes, remove the sign (#), and save it.

After that, to change the color, you can search for this script, the .bashrc:

if [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($debian_chroot)}[\033[01;31m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]\$ ' else PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi

in the script, I thickened "31". It is a color code. To change the color, you can change the color code. There is a color code reference for this site

This is screenshot when i change the code with 31:

enter image description here

May be useful and Enjoy, CMIIW :)

1
  • 1
    Redefining the palette like this does not only change the prompt's color but also the color of many terminal-based applications, likely resulting in ugly or unusable color setups. The intent of this configuration is to find your preferred shade of green for green, not to turn green into magenta.
    – egmont
    Jun 8, 2019 at 8:01

Not the answer you're looking for? Browse other questions tagged .