Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-16-2005, 10:33 AM   #1
Registered: Dec 2004
Location: Omaha, NE
Distribution: RH9
Posts: 31

Rep: Reputation: 15
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.
Old 05-16-2005, 10:35 AM   #2
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
They both give you full root privileges, but with "su" you don't inherit all of roots paths.
Old 05-16-2005, 03:32 PM   #3
Senior Member
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
"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.
Old 05-17-2005, 08:40 PM   #4
mohit dhawan
Registered: Mar 2005
Posts: 92

Rep: Reputation: 15
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
Old 05-17-2005, 09:57 PM   #5
Senior Member
Registered: Oct 2003
Location: lost in the midwest...
Distribution: Slackware
Posts: 1,098

Rep: Reputation: 54
what about sux?
Old 05-18-2005, 08:44 AM   #6
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

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


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference? the mac 13 Linux - Software 7 01-13-2005 04:38 PM
is there any difference/use of su - twice? darkleaf Linux - Software 2 10-12-2004 04:54 PM
difference between c and c++ nimra Programming 16 05-28-2004 01:55 AM
What's the difference? HHH Linux - Distributions 5 03-14-2004 10:41 AM
difference ... Iulian_B Linux - Networking 2 05-29-2002 04:23 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:59 PM.

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