I love this one. Makes your terminal look very cool. It will display the account your logged into in blue, followed by full path of your current directory (no more need for pwd). But here's the nifty bit, whenever you're root, root is displayed in red to constantly warn you!
- 1 -
Enter:
su -c 'pico /etc/bashrc'
...followed by the root password.
- 2 -
Add the following to the end of the file:
if [ $USER = 'root' ] ; then
COLOUR=41 # red
else
COLOUR=44 # blue
fi
STYLE='m' # Default grey text.
# STYLE=';1m' # Bright white text.
export PS1="\[\033[$COLOUR;37$STYLE\]$USER:\[\033[37;40$STYLE\]\w\\$ "
- 3 -
Press Ctrl+D to log-out and log-in as a user.
|