BASH – Adding coloured text

This will simply print your text in red. 

echo -e ‘\E[31mThis prints in red.’; tput sgr0

If you need any further information or want to know how to add bold, underlining, or background colours to your text click here. 

Rick Donato

Want to become a Linux expert?

Here is our hand-picked selection of the best courses you can find online:
Linux Mastery course
Linux Administration Bootcamp
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial