Browsing the last command's results in Bash is a bit hard because the command prompt and results are the same color. This makes it hard to separate the results of consecutive commands.
How do I change the color to pink for example?
bashcolorscommand linelinux
Browsing the last command's results in Bash is a bit hard because the command prompt and results are the same color. This makes it hard to separate the results of consecutive commands.
How do I change the color to pink for example?
Best Answer
@Rob is right; specifically, to change to light red (pink is not an available color):
You need to use ANSI escape sequences (in this case
1;31m
, the code for "light red foreground") which are enclosed by\[\033[
and\]
.Edit: Light purple may be closer to your desired color; the
PS1
change is left as an exercise for the reader.reference @ the linux documentation project