4

How to change the terminal colours from command line or console

view full story
linux-howto

http://linuxers.org – TweetSo, I have been working on this console based project that prints a lot of messages. I wanted to make certain messages - warning etc. to be highlighted so that it could catch the user's eye easily. Since, the code was in C, I looked for printing colour using printf and came to know about this old school way of changing a terminal colours through commands. Earlier using escape sequences (because they start with an escape character) people used to manage remote terminals. You can try this out in your own terminal. All we have to do is echo the escape sequence. The syntax is: [shredder12]$ (General)