Switch user command (su) has the following forms:
su
Switch to , without loading environment variables. If is
omitted (only "su"), it equals to "su root";
su -
Switch to , and loading environment variables. "-" is the
abbreviation of "-l", which means this is a "login" shell, so all .profile will
be sourced (man su for details). If is omitted (only "su -"), it
equals to "su - root";
su -c ""
Run command with the identity of another user. It is mostly used in one-off
command with root privileges:
su -c "" root
The double quotes around can‘t be omitted.
Switch User Command in Linux,布布扣,bubuko.com
Switch User Command in Linux
原文:http://www.cnblogs.com/darkmatter/p/3605647.html