Am 12.06.2013 01:05, schrieb Ian Malone:
I sometimes work with quite a lot of terminals, my two rules for
doing this are:
1. Drop out of root as soon as you're done.
2. If you can't remember the state of a given session close it and
start a new one.
- For both paying attention to the #/$ prompt and CWD display are
helpful. That's what I check whenever I switch to a given terminal
(also useful to know which machine you're logged into). Arguably
there's more potential for confusion if you normally only work in one,
because you get more reliant on remembering the state
[root@srv-rhsoft:~]$ cat /root/.bashrc | grep PS1
PS1="\[\033[1;31m\][\u@\h:\w]$\[\033[0m\] "
[harry@srv-rhsoft:~]$ cat /home/harry/.bashrc | grep PS1
PS1="\[\033[1;32m\][\u@\h:\w]$\[\033[0m\] "
results in a red prompt for root and a green for my users
and on production-servers i have as well as on backup-servers
different colors again since at least 2007 at this works well