LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-10-2008, 05:27 PM   #1
grunch
LQ Newbie
 
Registered: Mar 2007
Posts: 2

Rep: Reputation: 0
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
 
Old 02-10-2008, 05:35 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
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.

Last edited by leonscape; 02-10-2008 at 05:36 PM. Reason: clarification
 
Old 02-11-2008, 12:10 AM   #3
grunch
LQ Newbie
 
Registered: Mar 2007
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by leonscape View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off




All times are GMT -5. The time now is 10:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration