[ale] root's shell prompt
David S. Jackson
dsj at sylvester.dsj.net
Fri May 9 17:07:05 EDT 2003
On Fri, May 09, 2003 at 03:58:12PM -0400 John Wells <jb at sourceillustrated.com> wrote:
> On most of my machines, when I su to root, the $PS1 prompt changes. This
> is a nice feature, because I always know when I'm root or not by looking
> at the prompt.
Lots of different ways to do this, but you might try something
like
PS1="[\u@\h \w]"
case `id -u` in
0) PS1="${PS1}# ";;
*) PS1="${PS1}$ ";;
esac
in your .bashrc file
Personally, I prefer to just "su -" or use sudo. If you su -
then all your environment variables get updated to root's too.
--
David S. Jackson dsj at dsj.net
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The best cure for insomnia is to get a lot of sleep.
-- W. C. Fields
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list