-
列出所有开机自启服务:
systemctl list-unit-files --type=service | grep enabled
这个命令将列出所有启用的服务。
-
查看特定服务的状态:
如果你想查看某个特定服务是否开机自启,可以使用:
systemctl is-enabled <service_name>
将 <service_name> 替换为你要检查的服务名称。
-
查看所有当前运行的服务:
使用以下命令可以查看当前正在运行的所有服务:
systemctl list-units --type=service