linux-日常运维-服务管理-systemd

本文详细介绍CentOS7中使用systemctl进行服务管理的方法,包括服务的启动、停止、重启、状态查询及开机启动设置等操作。同时,解析了systemctllist-units命令输出的LOAD、ACTIVE、SUB字段含义,帮助读者理解服务的状态。

centos7,趋势
systemctl list-units --all --type=service
列出信息
linux-日常运维-服务管理-systemd
空格往下翻,会看到解释
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB. inactice :未激活 actice :激活 ,DESCRIPTION:一些解释信息
SUB = The low-level unit activation state, values depend on unit type.

几个常用的服务相关的命令
systemctl enable crond.service //让服务开机启动

systemctl disable crond //不让开机启动

systemctl status crond //查看状态

systemctl stop crond //停止服务

systemctl start crond //启动服务

systemctl restart crond //重启服务

systemctl is-enabled crond //检查服务是否开机启动

文件源路径:/usr/lib/systemd/system/

转载于:https://blog.51cto.com/13451715/2310938

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值