咨询热线:4006-75-4006

售前:9:00-23:30    备案:9:00-18:00    技术:7*24h

如何使用centos7.X中的systemctl命令

2016-12-17 17:06:43 8037次

1.查看centos版本:

#cat /etc/redhat-release

blob.png

2.我们对servicechkconfig两个命令都不陌生,systemctl 是管制服务的主要工具, 它整合了chkconfig service功能于一体。

blob.png

systemctl is-enabled iptables.service

systemctl is-enabled servicename.service  #查询服务是否开机启动

systemctl enable *.service  #开机运行服?

systemctl disable *.service  #取消开机运行

systemctl start *.service  #启动服务

systemctl stop *.service  #停止服务

systemctl restart *.service  #重启服务

systemctl reload *.service  #重新加载服务配置文件

systemctl status *.service  #查询服务运行状态

systemctl failed  #显示启动失败的服务


首页
最新活动
个人中心