Change the output colour of echo

0 votes
How do I change the output colour of echo a text in the terminal using echo command?
Jul 13, 2019 in Linux Administration by Upasana
• 8,620 points
727 views

1 answer to this question.

0 votes

Try using ANSI escape codes as the following;

Black        0;30     Dark Gray     1;30
Red          0;31     Light Red     1;31
Green        0;32     Light Green   1;32
Brown/Orange 0;33     Yellow        1;33
Blue         0;34     Light Blue    1;34
Purple       0;35     Light Purple  1;35
Cyan         0;36     Light Cyan    1;36
Light Gray   0;37     White         1;37
answered Jul 13, 2019 by Shubham
• 13,490 points

Related Questions In Linux Administration

0 votes
1 answer
0 votes
1 answer

How to change the owner of any folder in Linux system?

Hi@akhtar, Linux system has one command named chown. This ...READ MORE

answered Aug 14, 2020 in Linux Administration by MD
• 95,460 points
1,291 views
0 votes
1 answer

How to change the group of a folder in Linux system?

Hi@akhtar, You can use chgrp command in your ...READ MORE

answered Aug 14, 2020 in Linux Administration by MD
• 95,460 points
1,372 views
0 votes
1 answer

How to change permissions of folder and files in folder?

The chmod command is used to set/change the permissions ...READ MORE

answered Feb 1, 2019 in Linux Administration by Omkar
• 69,220 points
1,994 views
0 votes
0 answers

How to create a file in Linux from terminal window?

What's the easiest way to create a ...READ MORE

Apr 13, 2022 in Linux Administration by Rahul
• 9,680 points
576 views
0 votes
1 answer

How do you run TypeScript files from command line?

You can leave tsc running in watch mode using tsc ...READ MORE

answered May 31, 2022 in TypeSript by Nina
• 3,060 points
908 views
0 votes
1 answer
0 votes
1 answer

What is the meaning of 'errno'?

you can retrieve a complete list of ...READ MORE

answered May 20, 2019 in Linux Administration by Shubham
• 13,490 points
955 views
0 votes
1 answer

to pass the user's password to scp

Try using the 'expect' script on the ...READ MORE

answered May 29, 2019 in Linux Administration by Shubham
• 13,490 points
4,021 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP