[Gllug] Changing the text colour at the command line

Mark Fowler mark at twoshortplanks.com
Mon Dec 9 01:11:23 UTC 2002


On Sun, 8 Dec 2002, Laurie Turpin wrote:

> I have created a more interesting command line prompt, which is
> different for users and root It also means that when I enter commands at
> the command line the commands are in red when it is root and green when
> i'm a user

Hope you can get this to work properly, sounds cool.

As an alternative to having some kind of indication if you're root or not,
you might want to consider giving up on the whole logging in as root thing
altogether and using sudo.

I like sudo, it stops me doing stupid things.  Instead of logging in as
root I type

  bash-2.05b$ sudo command-to-run-as-root

And then it runs it as root.  It'll ask me for my password to make sure
that I am who I claim I am first as a security method (and it'll cache
that for a bit so I don't have to type it in again until I haven't used
sudo for a while)

http://www.courtesan.com/sudo/

Mark.

(P.S. yes, I'm new around here, and this is me delurking.)

-- 
  Mark Fowler
  http://www.twoshortplanks.com/          The 2002 Perl Advent Calendar
  mark at twoshortplanks.com               http://www.perladvent.org/2002/
                             a different perl module featured every day

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list