LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   PClinux OS konsole colours (https://www.linuxquestions.org/questions/linux-newbie-8/pclinux-os-konsole-colours-791970/)

t1nm@n 02-27-2010 10:41 AM

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 colour...like in bt and knoppix..

tell me how

MTK358 02-27-2010 11:26 AM

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:

http://wiki.archlinux.org/index.php/Color_Bash_Prompt

And here is my bash prompt as an example:

Code:

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


penguiniator 02-27-2010 12:16 PM

Also, you can get more detail about this than you probably want at http://tldp.org/HOWTO/Bash-Prompt-HOWTO/.

mjolnir 02-28-2010 05:43 AM

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.


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