Why do all the sudo? [was Re: Software updater no longer functional]

Ralf Mardorf silver.bullet at zoho.com
Sat Jan 28 05:05:38 UTC 2017


On Sat, 28 Jan 2017 09:33:46 +0900, Joel Rees wrote:
>sudo parameters can be a mess, too, especially since the shell blocks
>you from checking wildcard results unless you do get yourself an
>interactive shell (via sudo -i, etc.).

Is "etc." for

$ sudo sh -c "ls -hAl /home/foo/.bar*"

?


>It's better than doing the same thing with su, but not really perfect.

Why is using "sudo -i" better, than using "su"? Resp. "sudo sh -c"
better than "su -c"? Regarding environment variables by default "su"
usually does the same on all Linux distros, "sudo" doesn't. At least in
regards to portability "su" is the better choice.

Regards,
Ralf




More information about the ubuntu-users mailing list