View previous topic :: View next topic |
Author |
Message |
Zigen n00b
Joined: 16 May 2003 Posts: 16 Location: Santa Barbara, CA
|
Posted: Mon Dec 20, 2004 11:22 pm Post subject: Changing the look of the prompt |
|
|
How can I change this:
su-3.00#
to a line like this:
zigen@samurai
with pretty colors?
What file do I have to edit? |
|
Back to top |
|
|
Petyr Guru
Joined: 08 Jan 2003 Posts: 471 Location: San Diego, CA, USA
|
Posted: Mon Dec 20, 2004 11:27 pm Post subject: |
|
|
check out the .bashrc and .bash_profile
I think there's a color guide doc on the gentoo website (can't remember) and as far as the prompt goes, there should be info on that with the color guide.
Failing that check out the man page for bash. It will tell you what does what for the env var PS1 (which is the command prompt)
hth,
Petyr |
|
Back to top |
|
|
malone Apprentice
Joined: 19 Feb 2004 Posts: 159 Location: The p-n junction.
|
Posted: Tue Dec 21, 2004 6:15 am Post subject: |
|
|
Add something like the following to ~/.bashrc
Code: | # COLOUR VARIABLES
black='\[\033[00;30m\]'
BLACK='\[\033[01;30m\]'
red='\[\033[00;31m\]'
RED='\[\033[01;31m\]'
green='\[\033[00;32m\]'
GREEN='\[\033[01;32m\]'
yellow='\[\033[00;33m\]'
YELLOW='\[\033[01;33m\]'
blue='\[\033[00;34m\]'
BLUE='\[\033[01;34m\]'
magenta='\[\033[00;35m\]'
MAGENTA='\[\033[01;35m\]'
cyan='\[\033[00;36m\]'
CYAN='\[\033[01;36m\]'
white='\[\033[00;37m\]'
WHITE='\[\033[01;37m\]'
NC='\[\033[00m\]'
# BASH PROMPT
PS1="$RED\u@\h \$ $NC"
#PS1="$RED\u@\h $BLUE\W \$ $NC" |
The PS1 that's commented out is my prompt. _________________ malone |
|
Back to top |
|
|
psyqil Advocate
Joined: 26 May 2003 Posts: 2767
|
|
Back to top |
|
|
|