码迷,mamicode.com
首页 > 其他好文 > 详细

systemctl

时间:2018-06-25 13:11:16      阅读:204      评论:0      收藏:0      [点我收藏+]

标签:enable   修改   ice   rescue   某服务   efault   ble   cond   systemctl   

 

centos6

centos7

启动

service NAME start

systemctl start NAME[.service]

停止

service NAME stop

systemctl stop NAME[.service]

重启

service NAME restart

systemctl restart NAME[.service]

重载

server NAME reload

systemctl reload NAME[.service]

状态

service NAME status

systemctl status NAME[.service]

条件式重启(启动重启,不启动不重启)

service NAME condrestart

systemctl try-restart NAME[.service]

查看某服务当前状态

 

systemctl is-active NAME[.service]

查看所有已经激活的服务[所有]

 

systemctl list-units –type service [--all]

设定开机启动

chkconfig NAME on

systemctl enable NAME[.service]

禁止开机启动

chkconfig NAME off

systemctl disable NAME[.service]

查看所有开机启动

chkconfig --list

systemctl list-unit-files –type service

查看某服务是否开机紫气

 

systemctl is-enabled NAME[.service]

查看运行级别

runlevel

systemctl list-units –type target

查看默认运行级别

/etc/inittab

systemctl get-default

修改默认级别

 

systemctl set-default NAME.target

切换至紧急救援模式

 

systemctl rescue

systemctl

标签:enable   修改   ice   rescue   某服务   efault   ble   cond   systemctl   

原文地址:https://www.cnblogs.com/forlive/p/9223648.html

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