Click to See Complete Forum and Search --> : different color 'root' prompt
eXtremist
12-07-2001, 08:25 AM
Is there any way to change my root prompt so that its a different color?
I want to be able to log in as root using 'su' and have a RED prompt there. I then want the prompt to change back to default color when I log out of root.
Is this possible? It'd save me a lot of headaches! :)
thanks
z0mbix
12-07-2001, 08:46 AM
Read this (http://www.linuxnewbie.org/nhf/intel/shells/bashconfig.html) as it's really handy for bash configuration. another good site (http://www.linuxdiscussions.org/howtos/colorbash.htm)
Set you 'PS1' variable to whatever you want. There will be one in your root's '~/.bash_profile' or '~/.bashrc' file already, so just edit that and do 'source /root/.bashrc' or source '/root/.bash_profile'.
Dark Ninja
12-07-2001, 10:23 AM
Here's a link found at one of the links that cheeky_zombie gave you :
LinuxDoc - BASH Prompt HOW-TO (http://www.linuxdoc.org/HOWTO/Bash-Prompt-HOWTO/)
Frith
12-07-2001, 01:01 PM
that's actually a pretty spiffy idea. if I had known you could change the prompt colors, I would've been doing it months ago (red for superuser, blue for me, etc., etc.).
this'll keep me from getting confused when I look at all my xterms and wonder which ones are su-ed and which ones are for my normal user.
PLBlaze
12-07-2001, 01:14 PM
Hehe, have fun coloring your bash :D ...