一,列出所有服务:
systemctl list-units --type=service
二,列出所有运行中的服务
1, 用--state指定状态
systemctl list-units --type=service --state=running
2,直接grep
systemctl list-units --type=service | grep running
三,列出所有自启动的服务
1,列出所有自启动的单元
除了服务,还包括:socket/target/timer
systemctl list-unit-files --state=enabled
2,列出所有自启动的服务
systemctl list-unit-files --type=service --state=enabled
标签:service,centos,--,list,systemctl,自启动,列出 From: https://www.cnblogs.com/architectforest/p/18498895