我在 Ubuntu 16.04 LTS 中运行用户级服务。例如,我的 test.service 位于~/.config/systemd/user/test.service
.
我能够通过这样做来运行服务
systemctl --user start test.target
但是,当我尝试使用 读取它的日志时journalctl
,我收到了以下错误消息:
journalctl --user -u test.service
Hint: You are currently not seeing messages from other users and the system.
Users in the 'systemd-journal' group can see all messages. Pass -q to
turn off this notice.
No journal files were opened due to insufficient permissions.
我如何使用journalctl
用户的特定单位?