And what is the difference between sudo and su?
One (su) allows you to change users by authenticating as the user you are changing to, and the other (sudo) allows you to change users by authenticating as yourself and being granted permission to do so via a sudoers(5) policy.
...
And really, you shouldn't be using either one, since systemctl status does not require elevated permissions. If you were enabling or starting the service, that would require elevated permissions, assuming you aren't using systemctl --user to manage a service from your systemd user session.
|