Command:
echo -e “\\e[0;41m Background 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.
Other Color Codes’s:
Advertisement
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.
3 Comments
Thanks rahul, keep it up buddy !
This only works for me if I include two backslashes before the escape e’s.
Thanks Andy, I have updated the tutorial.