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 12, 2019 in Linux Administration by Upasana
• 8,590 points
75 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 12, 2019 by Shubham
• 13,380 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 1 day ago in Linux Administration by MD
• 43,500 points
15 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 8 hours ago in Linux Administration by MD
• 43,500 points
9 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 Jan 31, 2019 in Linux Administration by Omkar
• 69,020 points
97 views
0 votes
1 answer
0 votes
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,380 points

edited Dec 12, 2018 by Shubham 2,676 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,380 points
75 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,380 points
1,004 views