我在 Ubuntu 16.04 LTS 中运行用户级服务。例如,我的 test.service 位于~/.config/systemd/user/test.service
.
我能够通过这样做来运行服务
systemctl --user start test.target
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试使用 读取其日志时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.
Run Code Online (Sandbox Code Playgroud)
如何journalctl
用于用户的特定单位?