View Single Post
  #9   (View Single Post)  
Old 28th January 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

It's pretty obviously, one resets the environment.. the other does not.

su - root is the deprecated form of su -l root.

Quote:
Originally Posted by su(1)
-l Simulate a full login. The environment is discarded except for HOME, SHELL, PATH, TERM, LOGNAME, and USER. HOME and SHELL are modified as above. LOGNAME and USER are set to the target login. PATH is set to the value specified by the ``path'' entry in login.conf(5). TERM is imported from your current environment. The invoked shell is the target login's, and su will change directory to the target login's home directory.
The question is, how do you use su?
Reply With Quote