LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Thread Tools
Old 03-20-2005, 04:15 PM   #1
mojarron
Member
 
Registered: Mar 2005
Location: ol mexico
Distribution: Slackware10.1 | KDE3.3.2 | Kernel 2.4.29
Posts: 34
Thanked: 0
Question newbie question: whats the difference between "su root", "su" and "su -&quo


[Log in to get rid of this advertisement]
with all of them i get a password prompt for root, is there any difference between them?
mojarron is offline     Reply With Quote
Old 03-20-2005, 04:26 PM   #2
ahh
Member
 
Registered: May 2004
Location: UK
Distribution: Gentoo
Posts: 293
Thanked: 0
su root is the default command for su.

That is, if you type su it will assume you mean su root. To su to another user you will have to add the users name, e.g. su username.

If you use su you will still have the same envioroment, for example the $PATH variable, as the user who su'd.

If you use su - you will have the envioroment of the user you su'd to.
ahh is offline     Reply With Quote
Old 03-20-2005, 04:59 PM   #3
mojarron
Member
 
Registered: Mar 2005
Location: ol mexico
Distribution: Slackware10.1 | KDE3.3.2 | Kernel 2.4.29
Posts: 34
Thanked: 0

Original Poster
o, i see

thanks a lot ahh
mojarron is offline     Reply With Quote
Old 03-20-2005, 11:48 PM   #4
xgreen
Member
 
Registered: Aug 2003
Distribution: Sidux,Zenwalk
Posts: 388
Thanked: 0
"su" is equiv "su root" and "su -" equiv "su - root"

the diff between "su" and "su -" is "su -" you log in as a root with the env setting/profile (i.e you really log in as a root). just type "pwd" and you will be in the root home dir @ /root.

if you "su" only then basically you just "borrow" the root permission without having all the root env setting/profile . just "su" from your home dir and type "pwd", you can see that you still in the user dir i.e /home/user
xgreen is offline     Reply With Quote
Old 03-23-2005, 08:14 AM   #5
marsguy
Member
 
Registered: Nov 2004
Distribution: Red Hat Enterprise & SuSe 10
Posts: 77
Thanked: 0
thank you so much nazmin

you've been of great help!
marsguy is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Telling people to use "Google," to "RTFM," or "Use the search feature" Ausar General 72 03-09-2008 07:41 PM
Can you explain the difference between "Free Software (GNU)" and "Open Source"? hs123 General 5 03-03-2005 10:40 AM
difference between "Web server local URL" and "IPv4 address"? nocturna_gr Linux - General 2 09-17-2004 02:30 PM
LDAP object classes: cn=admin, why "simpleSecurityObject" and "organizationalRole&quo Hko Linux - Networking 0 08-06-2004 08:55 AM
"User" & "System" CPU load difference JJX Linux - General 3 06-06-2004 02:42 AM


All times are GMT -5. The time now is 12:55 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration