3
votes
2answers
143 views

Is “sudo su -” considered a bad practice?

Background I know the difference between su -, sudo su -, and sudo <command>: su - - switches user to root, requires the root password sudo su - - switches user to root, requires only the ...
6
votes
2answers
3k views

should use sudo or just su root in server management?

Which approach is better? For desktop usage, it seems that sudo is better since: I can have a more consistent history as a normal user Don't need to remember two passwords, which is especially ...
4
votes
2answers
11k views

execute su -c over ssh

I am trying to check the BIOS version of a server over SSH, a command that requires root privileges: ssh remote-server su -c dmidecode but this of course fails with the error: standard in must ...
3
votes
8answers
3k views

Linux - use “su -” but keep the current directory

When I do su - to get to root, my current directory is set to root's home. Is there anyway to keep the current directory that I was in, much like sudo -s. Or is the answer to use sudo?