How to change the terminal colors from command line or console
Posted on: 11/24/2010 04:28 PM

Linuxers shows you how to change the terminal colors from command line or console

How to change the terminal colors from command line or console


So, I have been working on this console based project. 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.



Printed from Linux Compatible (http://www.linuxcompatible.org/news/story/how_to_change_the_terminal_colors_from_command_line_or_console.html)