On 2020-01-29 12:08, tomas@tuxteam.de wrote:
On Wed, Jan 29, 2020 at 10:31:35AM +0000, mick crane wrote: [...]The only effective difference for me between "su -" and sudo seems to be that if you are in a directory you don't have permissions and want to change something sudo keeps you in the $PWD whereas "su -" puts you in /root and you have to go find it again.That's because "-" tells su to do that. Drop the "-" and it'll leave you in the current dir (among other details, consult the man page for details).
yes but "su" keeps the user's path for the executables. mick -- Key ID 4BFEBB31