systemctl daemon-reload 需要使用root/sudo执行吗?
Does systemctl daemon-reload need to be executed using root/sudo?
是否需要使用root/sudo执行systemctl daemon-reload?同样的命令是否适用于 Centos 7 和 Ubuntu 18.04.3 LTS?
$ systemctl daemon-reload
==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon ====
Authentication is required to reload the systemd state.
Authenticating as: neo
Password:
是的,我会这么说。
除非您在具有 root 权限的容器中执行此操作,否则很确定您需要对与 systemd 服务相关的任何内容具有 root 权限。
是否需要使用root/sudo执行systemctl daemon-reload?同样的命令是否适用于 Centos 7 和 Ubuntu 18.04.3 LTS?
$ systemctl daemon-reload
==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon ====
Authentication is required to reload the systemd state.
Authenticating as: neo
Password:
是的,我会这么说。 除非您在具有 root 权限的容器中执行此操作,否则很确定您需要对与 systemd 服务相关的任何内容具有 root 权限。