LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   difference between su and su - (https://www.linuxquestions.org/questions/linux-newbie-8/difference-between-su-and-su-324024/)

hywaydave 05-16-2005 10:33 AM

difference between su and su -
 
What's the difference between su and su -? I know su - gives you full root privileges while the other does. Can anyone ellaborate on this more? Thanks.

reddazz 05-16-2005 10:35 AM

They both give you full root privileges, but with "su" you don't inherit all of roots paths.

Poetics 05-16-2005 03:32 PM

"su" gives you root permissions, while "su -" is much more an entire login -- you are dumped into /root, your prompt (if different than the normal user prompt) will change, and as was mentioned, you will have all of root's path variable at your disposal.

mohit dhawan 05-17-2005 08:40 PM

when u r su - u can run commands in /sbin
when u r su u cannot
eg :/sbin/ifconfig (will wprk whenm u r su -)
and the same will not work when u r su

detpenguin 05-17-2005 09:57 PM

what about sux?

reddazz 05-18-2005 08:44 AM

Sux seems to be a suse specific app that appears to be some sort of combination between the "xhost +" and "su" commands. Search in the Suse documentation online for more accurate info.


All times are GMT -5. The time now is 07:04 AM.