Wednesday, July 13, 2011

How to change Font color and background colour in Linux Terminal

Change the Font Color of Shell Prompt in Linux:
$ export PS1="\e[0;31m[\u@\h \W]\$ \e[m "

The color can be chosen from below table values


List of Color code

Color Code
Black 0;30
Blue 0;34
Green 0;32
Cyan 0;36
Red 0;31
Purple 0;35
Brown 0;33
Blue 0;34
Green 0;32
Cyan 0;36
Red 0;31
Purple 0;35
Brown 0;33
Replace digit 0 with 1 to get light color version.

Change the background color in Linux Terminal:

1 comment:

  1. Hi Mahendra,
    Have you ever faced this error before?

    Caused By: java.io.IOException: Keystore was tampered with, or password was incorrect

    I've changed the password with a script for the user weblogic but after that I can't start the managed server OID anymore....

    Thanks,

    ReplyDelete