CentOS / RHEL 7
我希望看到系统上存在的服务列表,以及它们将自动启动的系统目标。这有可能吗?我知道我可以运行systemctl cat foo并检查单个服务的WantedBy字段值,但我希望看到所有内容的完整列表。
基本上,我在寻找相当于chkconfig --list的systemd
发布于 2018-01-11 00:38:40
啊,算了。看起来,chkconfig在RHEL/CentOS 7上仍然存在有限的容量,并且已经预见到了我的问题:
[foo@foobox ~] chkconfig
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
If you want to list systemd services use `systemctl list-unit-files'.
To see services enabled on particular target use
`systemctl list-dependencies [target]'.抱歉-我应该先检查一下。我只是觉得像chkconfig这样的遗留东西不会出现在新操作系统中。
因此,虽然我可以使用指定的单个目标运行命令,但我不能看到所有目标的启动状态的大摘要。
https://unix.stackexchange.com/questions/416253
复制相似问题