CentOS 7中systemctl的使用

CentOS 7.x开始,CentOS开始使用systemd服务来代替daemon,原来管理系统启动和管理系统服务的相关命令全部由systemctl命令来代替

1、原来的 service 命令与 systemctl 命令对

daemon命令:service [服务] start/stop/restart/status    

systemctl命令 : systemctl start/stop/restart/status   [unit type]

2、原来的chkconfig 命令与 systemctl 命令对比

daemon命令:chkconfig [服务] on/off   设置开机启动/不启动

systemctl命令 : systemctl enable/disable [unit type]

3、systemctl特殊的用法

systemctl is-active [unit type]         查看服务是否运行

systemctl is-enabled [unit type]     查看服务是否设置为开机启动

systemctl poweroff/reboot/suspend/hibernate    关机/重启/进入睡眠模式/进入休眠模式

 

转自:https://blog.csdn.net/u012486840/article/details/53161574
       
     

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值