如何列出archlinux中所有自启动服务?

问题描述 投票:0回答:2

我知道使用 systemctl status 来检查服务的特定状态,并使用 systemctl enable 在系统启动时将服务置于自动启动状态。但如何列出所有现有的自动启动服务呢?

archlinux systemd
2个回答
8
投票

对于系统和用户单元文件:

systemctl list-unit-files | grep enabled && systemctl --user list-unit-files | grep enabled

0
投票

您好,参考@papey的答案,格式更好的选项可能是使用

systemctl
state
选项:

$ systemctl list-unit-files --state=enabled
$ systemctl list-unit-files --user --state=enabled
© www.soinside.com 2019 - 2024. All rights reserved.