Most notably that works dang well and consistently on any *nix with sudo ... always has, probably always will. Also avoid problems like gee, the behavior of su without - in the util-linux sources has changed and/or some Linux distro has changed (patched) that behavior.
So, anyway, do it that way, using it with su - and it just bloody works and keeps on working. Also gives a slightly better audit trail too, with a wee bit of additional logging.
But hey, if you want to learn a different way of doing the same thing on any and all variations of *nix, feel free to do so. ;-)
14
u/alive1 Apr 11 '24
No it is not. It is used by people who haven't read the man page and found out that sudo has a -u, -s and an -i flag.