Command:

echo -e “\\e[0;41mBackground in Red Color\\e[0m”

The Above commands are using to set background color of output on Linux bash shell. In The output of above command background will be in red color. There are many other colors available which you can use defined as below. Just replace “0;41” with other color values in above text.

Advertisement

Other Color Codes’s:

   Black        0;40
   Red          0;41
   Green        0;42
   Yellow       0;43
   Blue         0;44
   Purple       0;45
   Cyan         0;46
   White        0;47

The 0m is used to reset the settings.

Background color of text in linux

Share.

3 Comments

Leave A Reply


Exit mobile version