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
168 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,480 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,300 points
266 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,300 points
211 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,170 points
388 views
0 votes
1 answer
+1 vote
1 answer

Installing JQ on Mac by command-line

On a mac, any application can be ...READ MORE

answered Dec 6, 2018 in Data Analytics by Shubham
• 13,480 points

edited Dec 12, 2018 by Shubham 4,317 views
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,480 points
196 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,480 points
3,037 views