Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-09-2008, 12:16 PM   #1
LQ Newbie
Registered: Jan 2008
Posts: 2

Rep: Reputation: 0
Constantly changing text color on the console

Hey..this is my first post here, and i'm a total linux noob, but I was wondering if there was any way to make the text color in my linux console to constantly change ever time i type a new command.

Basically my main goal is to be able to clearly differentiate output between commands by having each one output in a different (random) color. Thank you in advance!
Old 01-09-2008, 01:12 PM   #2
Senior Member
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250

Rep: Reputation: 164Reputation: 164
The bash prompt gets it's display style from the PS1 variable. I set my PS1 variable in my .bashrc file, which is only read upon starting the console session.

I suppose you'd need to create a script that rewrites the PS1 variable with new random color values, then somehow get bash to execute that script after every command you enter.
Old 01-09-2008, 02:35 PM   #3
LQ Newbie
Registered: Jan 2008
Posts: 2

Original Poster
Rep: Reputation: 0
i'm retarded

Last edited by jpanski; 01-09-2008 at 02:38 PM. Reason: i didn't fully read the man pages: rtfm for me


color, console, text

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Meaning of text color in the console? (ls output for example) EtherGhost Linux - General 3 12-31-2006 12:59 AM
Console Text Color Change Mercurius Slackware 6 05-16-2006 07:35 AM
How to get a color text console? dejavu_01 Debian 1 08-30-2005 11:38 AM
Changing text color in C++ Brakki Programming 3 04-21-2004 04:24 PM
changing console color? Wilson Linux - General 14 05-25-2003 09:29 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:36 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration