码迷,mamicode.com
首页 > 系统相关 > 详细

linux-日常运维- target介绍

时间:2018-10-31 17:08:13      阅读:1180      评论:0      收藏:0      [点我收藏+]

标签:service   sha   install   方便   cat   system   --   -o   sys   

target就是多个unit的组合

系统为了方便管理用target来管理unit
systemctl list-unit-files --type=target

systemctl list-dependencies multi-user.target //查看指定target下面有哪些unit
技术分享图片
systemctl get-default //查看系统默认的target
技术分享图片
systemctl set-default multi-user.target #设置默认的target ,同样的也会创建软链接
技术分享图片
一个service属于一种类型的unit
多个unit组成了一个target
一个target里面包含了多个service
cat /usr/lib/systemd/system/sshd.service //看[install]部分 #可查看service属于哪个tatget
技术分享图片

linux-日常运维- target介绍

标签:service   sha   install   方便   cat   system   --   -o   sys   

原文地址:http://blog.51cto.com/13451715/2310940

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!