LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   su - (https://www.linuxquestions.org/questions/linux-newbie-8/su-620172/)

grunch 02-10-2008 05:27 PM

su -
 
Hi, this may be a stupid question, but i wanna know why is the diference between the command "su" and "su -" ?

i had seen the "-" symbol in others shell command but without a letter how we use to see like "ls -l"

greets

leonscape 02-10-2008 05:35 PM

When you add the dash to su you inherit roots enviroment rather than just the rights.

i.e. you get roots paths settings and even bash aliases exported ($PATH) variables the lot.

It gets you closer to what you would get if root had just logged in rather than just su'ed to root.

grunch 02-11-2008 12:10 AM

Quote:

Originally Posted by leonscape (Post 3052800)
When you add the dash to su you inherit roots enviroment rather than just the rights.

i.e. you get roots paths settings and even bash aliases exported ($PATH) variables the lot.

It gets you closer to what you would get if root had just logged in rather than just su'ed to root.

Thank's leonscape, very clear :)

Regards


All times are GMT -5. The time now is 12:04 PM.