Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-04-2006, 02:18 AM   #1
LQ Newbie
Registered: Mar 2006
Posts: 16

Rep: Reputation: 0
changing the color of cui

can any one tell me how to change the color of command user interface.
thank you
Old 05-04-2006, 02:38 AM   #2
Red Hat India
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260

Rep: Reputation: 34
Hello jitheshmurali,

Changing the colour of the bash prompt is really simple. The bash prompt is setup in the .bash_profile file, residing in the home directory of every user. The bash prompt is defined using the PS1 variable. There are excellent tutorials on setting the bash prompt. For changing the colour, you can refer to ''.

Another URL on making the prompt really funny and different, you can refer ''.

This simple bash script gives you the available colours that can be set for the terminal.
# This file echoes a bunch of color codes to the
# terminal to demonstrate what's available. Each
# line is the color code of one forground color,
# out of 17 (default + 16 escapes), followed by a
# test use of that color on all nine background
# colors (default + 8 escapes).

T='gYw' # The test text

echo -e "\n 40m 41m 42m 43m\
44m 45m 46m 47m";

for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \
'1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \
' 36m' '1;36m' ' 37m' '1;37m';
do FG=${FGs// /}
echo -en " $FGs \033[$FG $T "
for BG in 40m 41m 42m 43m 44m 45m 46m 47m;
do echo -en "$EINS \033[$FG\033[$BG $T \033[0m";


Last edited by vimal; 05-04-2006 at 04:01 AM.


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
Changing text color in C++ Brakki Programming 3 04-21-2004 05:24 PM
Changing the color of ls output? exitsfunnel Linux - Newbie 1 02-20-2004 12:20 AM
changing console color? Wilson Linux - General 14 05-25-2003 10:29 PM
Changing color on taskbar jlj Linux - Newbie 1 02-17-2003 02:36 PM
Changing font color uglyvorys Linux - General 2 02-02-2003 01:39 PM

All times are GMT -5. The time now is 08:32 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration