
Why do we use su - and not just su? - Unix & Linux Stack Exchange
Feb 7, 2011 · 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 just …
What are the differences between "su", "sudo -s", "sudo -i", "sudo …
Oct 22, 2011 · su lets you switch user so that you're actually logged in as root. sudo -s runs a shell with root privileges. sudo -i also acquires the root user's environment. To see the …
What is the difference between 'su -' and 'su root'? [duplicate]
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 …
su - user Vs sudo su - 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 …
command line - difference between sudo su - and su - - Ask Ubuntu
With su - you will be asked to authenticate with the root password. This only works if you have set the root password. This only works if you have set the root password. In terms of functionality, …
su vs sudo -s vs sudo -i vs sudo bash - Unix & Linux Stack Exchange
su - means environment variables will be reset to root and su means environment variables as old user. for example: root's home directory if you use su - or old user home directory if you use …
How does the "su" command work? - Unix & Linux Stack Exchange
Jul 24, 2017 · The su executable has a special permission bit on it, called the "set-user-ID bit" or "setuid" which causes it to execute such that the effective user ID of the process is that of the …
What's the difference between sudo su - and sudo su
I will create a question from it but sudo su - and sudo su -l differs. On an account where I ssh into with a key only, and I have sudo rights to change to a specific other user, sudo su - changes …
Why does su fail with "authentication error"? - Ask Ubuntu
However, the OP has asked specifically about su to root. I was assuming they knew why they want to do that and that they have a good reason to do it. So I was adding an alternate path to …
`su` command: Permission denied - Unix & Linux Stack Exchange
Sep 17, 2015 · So running 'su -m ' as root will make bash to read ~/.bashrc which expands (due to preserved environment) to /root/.bashrc which you have no rights as user. Your /etc and …