Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 12-19-2004, 11:54 AM   #1
Senior Member
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Rep: Reputation: 47
The different type of roots

When I want to go to the root, I write the following:

su - root and press enter
Then I get the following message.

I write my password : nicosiar and press enter

This way I am in the root.

[root@h27n2fls301o1037 root]#

I can do the same thing in different way.

First I write su and press enter
Then I get the following message

I write the password: nicosiar and press enter
Now I am in a different root.

[root@h27n2fls301o1037 heden]#

My question is what is the difference between the two different roots?

I have seen that just writing su would be enough to go to the root when installing software.
What are those differences?
Old 12-19-2004, 12:57 PM   #2
Registered: Dec 2004
Location: MA
Distribution: Various
Posts: 149

Rep: Reputation: 23
You aren't in a different root, but your environment (the variables and their values) are different.

With just "su", you keep your present environment. With "su -", it's as though you logged in as root - any environment variables you had are (temporarily) tossed, and you pick up the same ones root has if it logged -n - you actually run the same files (.bash_profile etc.)

By the way, if you are root, you can "su - someotheruser" to login as that user without knowing their password.

Tony Lawrence


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Two roots? revenge80200 Yoper 0 01-29-2005 05:55 PM
Installpkg and different roots pcause Slackware 2 08-12-2003 01:21 PM
roots password expired. wlfdgcrkz Linux - Software 2 06-19-2003 06:50 AM
2 roots in Linux box mikeshn Linux - Newbie 4 03-01-2002 02:02 PM
How do I change roots umask? 360 Linux - Networking 1 02-19-2002 06:56 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:22 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration