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 in Linux Administration by Upasana
• 8,550 points
44 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 by Shubham
• 13,310 points

Related Questions In Linux Administration

0 votes
1 answer
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 in Linux Administration by Omkar
• 67,660 points
36 views
0 votes
1 answer

how to loop through the content of a file using bash

One of the ways to do it ...READ MORE

answered Feb 15 in Linux Administration by ajs3033
• 7,280 points
95 views
0 votes
1 answer

How to change the default shell in Linux?

1. Change the password file directly for ...READ MORE

answered May 24 in Linux Administration by Upasana
• 8,550 points
38 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,310 points

edited Dec 12, 2018 by Shubham 1,575 views
0 votes
1 answer

What is the meaning of 'errno'?

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

answered May 20 in Linux Administration by Shubham
• 13,310 points
38 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 in Linux Administration by Shubham
• 13,310 points
37 views