1. First use Help to understand Su, sudo su, sudo
2. Second, understand "login Shell" and "interactive shell".
"When Bash starts executes the commands in a variety of different scripts.
(1) When started as an interactive login Shell:bash reads and executes The/etc/profile (if it exists). After reading. File, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile on that order, and reads and executes The first one (that's exists and is readable). When a login shell exits: Bash reads and executes ~/.bash_logout (if it exists).
(2) When the started as an interactive shell (but not a login shell): Bash reads and executes ~/.BASHRC (if it exists). "
Obviously the login shell and the interactive shell are different in the setting of the environment, in detail you can refer to: Http://groups.google.com/group/Linux.debian.user/browse_ Thread/thread/2b71ecfc45789958/7bff24e3bae74b36?lnk=raot
3. Then the SU Command's cross-bar is very easy to understand, the parameter of the bar-, is to let the switch gets the shell is a login shell
-,-L,--login make the shell a login shell
linux-Command-su