Fedora- redhat Linux

Craig Thomas cjtinhp at optonline.net
Thu Feb 24 16:00:32 UTC 2005


On Thu, 2005-02-24 at 16:46 +0100, Duncan Lithgow wrote:
> The important tip that I didn't get for ages was using typing
> # su -
> 1. '#' means 'you're logged in as a user'
> 2. '$' means 'you're logged in as root'

I think you've said that backwards ;] 

[my FC3 machine]
[cwt at jaja ~]$ su -
Password:
[root at jaja ~]#


> 4. If you type
> # su -
> it will ask you for your root password and behave as if you'd loged in 
> as root. I don't understand why but it works better than
> # su root

su - gets root's shell, su keeps the user's.  

Which means, among other things, your environment variables are still
your own user's.

I'm sure some else can explain better, but basically su isn't really
'becoming' root.

-- 
Craig Thomas <cjtinhp at optonline.net>




More information about the fedora-list mailing list