Craig Thomas wrote:
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 -
- '#' means 'you're logged in as a user'
- '$' means 'you're logged in as root'
I think you've said that backwards ;]
[my FC3 machine] [cwt@jaja ~]$ su - Password: [root@jaja ~]#
Yup. Notice, though, that with the original Fedora Core 3 setup, the prompt won't get changed correctly if you are using (t)csh. Fixed in one of the updates, I think.
- 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.