Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '"su" command' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
"su" command
Authored by: j-beda on Jul 25, '02 11:16:03AM

One can also use the "su" command doing something like "su fred" to become fred, which has the advantage of keeping you in the same directory as you were before the "su" command. "login" will cause you to go to the home directory of the account you are logging into.

I think that "su" stands for "set user" or something like that. I also think that for many unix systems "su root" is commonly used to get superuser privledges, but since Mac OS X doesn't have a "root" account by default, the "sudo" command is generally used to execute one command as superuser or "sudo tcsh" to get a login shell as superuser.

(Does the "preview" count as a comment submission? The system is asking me to wait for 60 seconds before hitting the "submit" button.)




[ Reply to This | # ]
su is better than login
Authored by: chabig on Jul 25, '02 12:26:21PM

Thanks for the tip on su. I just tried it and it is better than login for two very good reasons:

1) It does keep you at the same directory
2) It still lets you use the tcsh history. When I used login to change the user, I was not able to use my shell history any more.

Chris



[ Reply to This | # ]