首页 > 系统服务 > 详细

linux-日常运维- unit介绍

时间:2018-10-31 16:42:34      阅读:205      评论:0      收藏:0      [点我收藏+]
ls /usr/lib/systemd/system/ 文件源路径
技术分享图片

上述图片中的文件都叫unit

service 系统服务
target 多个unit组成的组
device 硬件设备
mount 文件系统挂载点
automount 自动挂载点
path 文件或路径
scope 不是由systemd启动的外部进程
slice 进程组
snapshot systemd快照
socket 进程间通信套接字
swap swap文件
timer 定时器

unit相关的命令
systemctl list-units //列出正在运行的unit
技术分享图片
systemctl list-units --all //列出所有,包括失败的或者inactive的

systemctl list-units --all --state=inactive //列出inactive的unit 指定状态

systemctl list-units --type=service//列出状态为active的service

systemctl is-active crond.service //查看某个服务是否为active

systemctl is-enabled crond.service //查看某个服务是否为enabled

linux-日常运维- unit介绍

原文:http://blog.51cto.com/13451715/2310939

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!