August 29, 2014 Hot Topics: RSS RSS feed Download our iPhone app
Linux Console Colors & Other Tricks    • January 24, 2001   • By
Jay Link   • Send Email »   • More Articles »  If you've just
begun programming on the Linux console, you may find yourself
less than enthused about the available color choices (or lack
thereof). Indeed, the default -- dreary gray on black -- brings
to mind Henry Ford's famous statement regarding color schemes
for his Model T: "You can have any color you want, as long as
it's black."  You may have noticed that the "ls" command is
capable of producing a rainbow of colors; executables are
typically green, compressed files are red, and graphics (.GIF,
.JPG, etc.) are purple.  But are these special hues limited to
file listings? If not, how can you apply the day-glo treatment
to your own code?  The answer is surprisingly simple: all you
need are some console escape sequences.  Try typing the
following at your command prompt:     echo -e "\033[35;1m
Shocking \033[0m" What you should ha