About 2,310,000 results
Open links in new tab
  1. What are the differences between "su", "sudo -s", "sudo -i", "sudo su"?

    Oct 22, 2011 · sudo su Asks your password, becomes root momentarily to run su as root. sudo su - Asks your password, becomes root momentarily to run su - as root. So in this case you are running …

  2. Why do we use su - and not just su? - Unix & Linux Stack Exchange

    Feb 7, 2011 · The main difference is : su - username sets up the shell environment as if it were a clean login as the specified user, it access and use specified users environment variables, su username …

  3. su - user Vs sudo su - user - Unix & Linux Stack Exchange

    Aug 22, 2018 · Secondly: sudo -i and su - do the same thing (su - is equivalent to su --login), using different authorization mechanism: su verifies the password for the root account, while sudo verifies …

  4. What is the difference between 'su -' and 'su root'? [duplicate]

    8 su - switches to the superuser and sets up the environment so that it looks like they logged in directly. su root switches to the user named root and doesn't simulate directly logging in. If the superuser is …

  5. su vs sudo -s vs sudo -i vs sudo bash - Unix & Linux Stack Exchange

    su is equivalent to sudo -i and simulates a login into the root account. Your working directory will be /root, and it will read root's .profile etc. The prompt will change from $ to #, indicating you have root …

  6. Right way to use su and a specific command? - Unix & Linux Stack …

    Jul 28, 2020 · The following is a bit of a tangent: From the OpenBSD su(1) manual, for example: SYNOPSIS su [-fKLlm] [-a auth-type] [-c login-class] [-s login-shell] [login [shell arguments]] [...] If the …

  7. What's the difference between `su -` and `su --login`? - linux

    Oct 24, 2016 · From su 's man page: For backward compatibility, su defaults to not change the current directory and to only set the environment variables HOME and SHELL (plus USER and LOGNAME if …

  8. Difference between su vs sudo - Unix & Linux Stack Exchange

    Apr 4, 2020 · If you are trying to run a command as another user, sudo will ask for your password, su will ask for the other user's password. Sudo is designed to let unprivileged users run specific commands …

  9. 'sudo su -' vs 'sudo -i' vs 'sudo /bin/bash' - when does it matter ...

    Nov 13, 2013 · sudo su - This time it is a login shell, so /etc/profile, .profile and .bashrc are executed and you will find yourself in root's home directory with root's environment. sudo -i It is nearly the same as …

  10. What is the difference between 'su -' , 'sudo bash' and 'sudo sh'?

    su -: This will change your user identifier and inherit the environment variables as if you had logged in with that user. Normally you would use the format su - <userid> to login as the user . If you drop the …