如何列出运行在System init脚本启动的实例上的服务?
我试图在没有运气的情况下运行“服务--状态--全部”。
发布于 2013-09-17 01:56:51
原因很简单。没有名为--status-all的命令/函数:
$ service | --status-all
Usage: service < option > | --status-all | [ service_name [ command | --full-restart ] ]
--status-all: command not found在用法中,条形|的意思是OR。因此,这个用法告诉您的是使用以下两种方法:
service <option>:这里的选项是start,stop等。service --status-all:它为您提供了支持状态的所有服务的状态列表。service service_name command:服务名称显然是init中任何服务的名称,命令是start、stop、restart等。service service_name --full-restart:调用stop命令,然后调用start命令。https://askubuntu.com/questions/346420
复制相似问题