Help answer threads with 0 replies.
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 02-27-2010, 11:41 AM   #1
Registered: Aug 2009
Location: Trivandrum, Kerala, India.
Distribution: Slackware 14.2 x86_64
Posts: 96
Blog Entries: 3

Rep: Reputation: 25
PClinux OS konsole colours

hello i wanted to know how i can change the colours to the prompt

[ashish@localhost ~]$
this is how my prompt looks like i want to change it to red in bt and knoppix..

tell me how
Old 02-27-2010, 12:26 PM   #2
LQ 5k Club
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
That doesn't depend on the distro and terminal application.

The prompt is stored as a bash environment variable and can contain ANSI escape codes to set how the terminal displays it.

This could help:

And here is my bash prompt as an example:

PS1='\[\e[1;32m\][\A \u:\W]\$ \[\e[m\]' # Main prompt (Looks like this: [HH:MM username:pwd]$ )
PS2='\[\e[1;32m\]> \[\e[m\]' # Secondary prompt for multi-line commands
PS3='\[\e[1;32m\]#? \[\e[m\]' # Switch selector prompt
PS4='\[\e[1;32m\]$0:$LINENO+ \[\e[m\]' # Bash script debugging line number indicator

Last edited by MTK358; 02-27-2010 at 12:29 PM.
Old 02-27-2010, 01:16 PM   #3
Registered: Feb 2004
Location: Olympia, WA
Distribution: SolydK
Posts: 442
Blog Entries: 3

Rep: Reputation: 60
Also, you can get more detail about this than you probably want at
Old 02-28-2010, 06:43 AM   #4
Registered: Apr 2003
Posts: 768

Rep: Reputation: 87
One thing you might keep in mind is that the superuser terminal commonly uses a red prompt, I suppose as a warning, to keep one from inadvertently damaging the system.


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
Konsole always give SuperUser Konsole - can't get regular shell checkmate3001 Linux - Desktop 3 08-05-2008 11:00 AM
PClinux salah-ad-din Linux - Distributions 1 07-08-2006 08:26 PM
pclinux os khaleel5000 Linux - Software 4 01-30-2006 02:37 AM
Can I set ssh to change my konsole colours when I connect to a remote box? davee Linux - General 2 12-16-2004 03:56 PM
preserving konsole colours kazuni Linux - Newbie 2 06-03-2003 09:18 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:13 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