I see both does the same thing and both end me up in the same directory.So is it really the same or there is a difference?  Also doing su and su - makes me root user in both the cases.So how is it even benficial?
14250
What is the difference between the following commands:  su sudo -s sudo -i sudo bash   I know for su I need to know the root password, and for sudo I have to be in the sudoers file, but once executed what is difference?  I know there is a difference between su and sudo -s because my home directory is /root after I execute su, but my home directory is still /home/myname after sudo -s. But I suspect this is just a symptom of an underlying difference that I'm missing.
93918
I love Linux and everything she stands for; however, unfortunately I grew up with Windows. Thusly so I have learned very bad practices (such as NT Authority will protect me). I have several Linux VPS's for personal and educational uses and I manage all of them from the command line. Through the management of these servers I have learned very painful lessons of the power of the Root user. Such as:   rm -d -R /* chown www-user:www-user -R /* Etc.    I've only removed my root directory twice, but just last week I changed the permission of the whole drive - effectively locking the Root out.   Now I know that I should never be logged in as Root, but most of the time I have to deal with files that only the Root owns so I sudo and run the command.   So my question is, is there a way to prompt the user (who is root, or sudo'ed) when a potentially hazardous command is executed, so the user may rethink their decision? Possibly through scripts in Bash, or a different sudo wrapper.   Or (I ask this hopefully, and very simplified) is there a way to set up permissions where instead of a two tier user system (Root user, regular user) there is a three tier system like in Windows (NT Authority, Administrator, other User). Basically is there a way to keep the ability of System administration, but restrict access to some system files.
47300
How is it possible that I cannot log in as root by su root or su (I get incorrect password error), but I can log in by ssh root@localhost or ssh root@my_local_IP with the same password?  I'm using CentOS 6.4.    Update1 :  cat /etc/pam.d/su   gives:   #%PAM-1.0 auth        sufficient  pam_rootok.so # Uncomment the following line to implicitly trust users in the "wheel" group. #auth       sufficient  pam_wheel.so trust use_uid # Uncomment the following line to require a user to be in the "wheel" group. #auth       required    pam_wheel.so use_uid auth        include     system-auth account     sufficient  pam_succeed_if.so uid = 0 use_uid quiet account     include     system-auth password    include     system-auth session     include     system-auth session     optional    pam_xauth.so   Update2 :  $ sudo grep su /var/log/secure | grep -v sudo   gives :  Feb 23 13:12:17 fallah su: pam_unix(su:auth): authentication failure; logname=fallah uid=501 euid=501 tty=pts/0 ruser=fallah rhost=  user=root   repeated about 20 times.
113290
I have PATH=foo set in /etc/profile  According to /etc/password the root and myaccount users have /bin/bash as the login shell.  When I log in as myaccount, the PATH has been set correctly from /etc/profile. If I then sudo su, PATH does not include the value set in /etc/profile.  If I sudo su - instead then /etc/profile is sourced. I know it is good practice to do this anyway but I don't see why it's necessary in order to source /etc/profile.  Why does sudo su clobber PATH, disregarding /etc/profile and how to I make it not?
119672
Is there a difference? Both versions are common.  If there is a difference, which do I use when, and why?
83485
I'm trying to understand the difference between these two commands: sudo find / -name .DS_Store -delete  and sudo find / -name &quot;.DS_Store&quot; -exec rm {} \;  I noticed that the -exec ... {} method is preferred. Why? Which one is safer/faster/better? I've used both on my Macbook and everything appears to work well.
27663
I just ran this a few seconds ago. I managed to do Ctrl - C as soon as I realized what I started doing.  So far the only directory it's started going through is /bin.  I'm afraid to do anything else. So far I realized I can't use su as my normal user anymore.  Luckily I still have another root terminal open. What do I do?
34674
I've been using gksudo nautilus and sudo nautilus through Alt+F2.   What's the difference? They look very similar!
84320
I have created 100&nbsp;GB for /. When I opened Nautilus I have found the root folder. So what is difference between / and /root?  My username is enigma, and I have a folder named enigma in the /home folder and another folder with the same name in /media. What is the difference between these two folders and when do I have to use the second folder?
18955
I want to be able to 'su' to a specific user, allowing me to run any command without a password being entered.  For example:  If my login were user1 and the user I want to 'su' to is user2:  I would use the command:  su - user2  but then it prompts me with   Password:
123703
is known as a “systemless” root method. It’s essentially a way to modify the system without actually modifying it. Modifications are stored safely in the boot partition instead of modifying the real system files.   I have looked around but did not find a sufficient explanation as to how it actually works. How is the root access gained and maintained? What exactly is the role of the boot partition and if it integrates with the system partition how it does it? A really detailed description of how it works lacks from everywhere I searched so it would be really highly appreciated.
68546
I have six directories with command files. These are /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin and /usr/local/sbin.  What are the differences between these? If I'm writing my own scripts, where should I add them?    Related:
7483
Total Ubuntu/Linux in general noob here.   What is the difference between /home and /Home ? I've noticed I need to use sudo to do anything in /home. /Home (home folder?) has pictures, videos, etc. in it so thats where I want to really create new folders and stuff but I can't seem to get to it using cd.
93843
My question is asking regarding a specific observation that I would like to understand.   I just tried to install the package rJava in R and failed even though I prefaced the installation as suggested  with:  sudo R CMD javareconf   Then I came across :     Using sudo and running as root are not exactly the same thing. –  Jon7   Desparate as I was I tried it:  sudo su R CMD javareconf   And to my surprise I suddenly could install that package.    Sorry for the lenghty introduction but I wanted to give you a context to prevent answers like . The question does not aim at specifically the described observation - rather at those "things" in general on Ubuntu.  My question is: How could this be possible? What is the difference between sudo X and runnding X as root?
108607
What do these two commands mean?  cd ../   cd /..  I am ending up in two directories upwards the tree on the first command and in the root directory from the second command. Why does that happen?
6272
I've read  and am interested in this line:     You should never use normal sudo to start graphical applications as Root.   Why? What is the difference? Please provide a simple explanation, as I'm just a normal desktop user.
64044
Possible Duplicates:             For instance, it occurred to me that the question "what's the difference between using 'sudo su - username' with and without a hyphen?" might be useful to others to have an answer to.  Is it okay to ask it myself and then answer it myself, so as to include the answer to that (or any other) question on these sites.  (I assume that one would be for superuser.)  It's possible that this question might already be answered on superuser.com, but that's not the point.  Substitute any example question you want: is it okay to answer your own questions, and even to ask them with the purpose of answering them.  The only reason not to do this, that I can see, are that some might perceive it as "gaming the system" to get more points.  But the reason for it is that it improves the supply of (hopefully) good questions and answers.  And I think the points would still be fairly earned.