systemctl搜索服务

Systemd 可以管理所有系统资源。不同的资源统称为 Unit(单位)。
Unit 一共分成12种。
Service unit:系统服务
Target unit:多个 Unit 构成的一个组
Device Unit:硬件设备
Mount Unit:文件系统的挂载点
Automount Unit:自动挂载点
Path Unit:文件或路径
Scope Unit:不是由 Systemd 启动的外部进程
Slice Unit:进程组
Snapshot Unit:Systemd 快照,可以切回某个快照
Socket Unit:进程间通信的 socket
Swap Unit:swap 文件
Timer Unit:定时器
systemctl list-units命令可以查看当前系统的所有 Unit 。

列出正在运行的 Unit
$ systemctl list-units

列出所有Unit,包括没有找到配置文件的或者启动失败的
$ systemctl list-units --all

列出所有没有运行的 Unit
$ systemctl list-units --all --state=inactive

列出所有加载失败的 Unit
$ systemctl list-units --failed

列出所有正在运行的、类型为 service 的 Unit
$ systemctl list-units --type=service
---------------------
作者:daijiguo
来源:CSDN
原文:https://blog.csdn.net/daijiguo/article/details/78081633
版权声明:本文为博主原创文章,转载请附上博文链接!

原文地址:https://www.cnblogs.com/fire909090/p/11132005.html