if the effective UID is 0, a #, otherwise a $
I'm customizing my bash prompt.
/home/rozilla/.bashrc Code:
# ~/.bashrc: executed by bash(1) for non-login shells. Code:
# ~/.profile: executed by the command interpreter for login shells. Code:
# System-wide .bashrc file for interactive bash(1) shells. Code:
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) What am I doing wrong? :-( |
Don't you need to be editing /root/.bashrc or /root/.profile with your custom root prompt? Assuming you always want a full login shell when su-ing to root, then this file will be read each time you su -.
edit: Also, you might find you need to export the PS1 variable in /etc/profile: Code:
if [ "$PS1" ]; then |
Here's what you need to change
In this line in your /etc/bash.bashrc
Code:
PS1="[$HC$BRED$HC$FYEL\t $HC$FWHT\u$HC$FGRN@$HC$FWHT\h:$RS $HC$FWHT\w]$HC$FYEL\$$RS " Code:
PS1="[$HC$BRED$HC$FYEL\t $HC$FWHT\u$HC$FGRN@$HC$FWHT\h:$RS $HC$FWHT\w]$HC$FYEL\\$$RS " Code:
PS1='\$ ' Code:
PS1="\\$ " |
All times are GMT -5. The time now is 01:41 PM. |