How do I change the color of text in a terminal or virtual console?

Updated -

Release Found: Red Hat Enterprise Linux

Problem:

You need to display text in a terminal or virtual console but would like it to display in a pre-determined color.

Solution:

To change the color in or within a string of characters, prefix one of the codes from the table below with the escape c...

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content