虽然这https://serverfault.com/a/915634/1060236建议列出所有服务,当我运行时:
sudo systemctl status "prefix.*" --all
或者sudo systemctl show "prefix.*" --all
它排除了Active
状态为 的服务。它仅显示处于或状态的Inactive (Dead)
服务。我如何获取完整列表的状态?Failed
Running
如果我直接查找服务状态Inactive (Dead)
,那么它将显示正确的结果,即sudo systemctl status prefix.somedeadprocess.service
:
○ prefix.somedeadprocess.service
Loaded: loaded (/etc/systemd/system/prefix.somedeadprocess.service; disabled; vendor preset: enabled)
Active: inactive (dead)