Welcome to the most active Linux Forum on the web.
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 08-25-2003, 01:15 PM   #1
Registered: Aug 2003
Location: Romania
Distribution: Ubuntu 6.06
Posts: 278

Rep: Reputation: 30
Question Colored prompter

I guess this is kinda` lame question... but tell me how can I make my shell look better... change the ls colors or have a colored promter. I have to change the shell or I can costumize bash to do what I want.
thx... and i`m sorry for my english.
Old 08-25-2003, 01:25 PM   #2
Senior Member
Registered: Dec 2001
Location: 35.7480 N, 95.3690 W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
You have add to .bashrc. After your done editing the file make sure you
source .bashrc
On you can find a Bash Prompt HOWTO

Here is the code I use:

function myprompt{
local GRAD1=`tty|cut -d/ -f3`
local COLOR1="\[\033[1;34m\]"
local COLOR2="\[\033[0;34m\]"
local COLOR3="\[\033[1;36m\]"
local COLOR4="\[\033[0m\]"
local COLOR5="\[\033[1;32m\]"
local COLOR6="\[\033[0;32m\]"

case $TERM in
*term* | rxvt )
PS1="$COLOR1[$COLOR3\$(date +%I:%M) $COLOR3\u \w$COLOR1]$COLOR3\$$COLOR4 \[\033]0;\u \w\007\]" ;;
PS1="$COLOR1[$COLOR3\$(date +%I:%M) $COLOR3\u \w$COLOR1]$COLOR3\$$COLOR4 "
#PS2='[\w]\$ ';;
PS2="[$(date +%I:%M) \u \w]\$ \[\033]0;\u \w\007\]" ;;




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
Running GRUB at its prompter grautu Linux - General 6 09-19-2005 09:01 AM
colored ls in screen [GOD]Anck Slackware 2 03-22-2005 03:07 PM
colored shell devit Slackware 1 03-15-2004 09:23 AM
colored shell spank Linux - General 3 08-31-2003 02:18 AM
colored prompter/shell spank Linux - Newbie 2 08-30-2003 06:02 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:56 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
Open Source Consulting | Domain Registration