Not really, well sorta...
The su command stands for Substitute User. Using the command su <username> allows you to login as another users. Typically the - is used to identify the session as a Login Shell. So su - allows you to login as root in that shell, not just share the permissions, but your environment is shared as well.
The difference is that now you're still logged in as root, however the shell assumes you're actually two different users and not just sharing another user's permissions, so it's placing the <Substituted Username> in the prompt as a reminder.
Sound kinda confusing? Try logging in with just su instead of su - and notice the difference. Notice the difference when you enter echo $PATH in each of them. (Note, to see the difference, you should be logged in as a normal user and try both methods).
Last edited by Scribbler_01; 10-12-2004 at 04:51 PM.
|