Loading...

centos查看自启动服务 古月士心

–>

centos查看自启动服务

  • 1,查看自启动服务?
  • 2,查看某服务的开机启动状态?
  • 3,启动(关闭,重启,查看)某个服务?
  • 4,设置开机启动或者关闭某个服务?

 

1,查看自启动服务?

systemctl list-unit-files –type service |grep enabled

 

2,查看某服务的开机启动状态?

systemctl list-unit-files –type service |grep service_name

 

3,启动(关闭,重启,查看)某个服务?

(centos6系统):service  service_name  (start|stop|restart|status)

(centos7系统):systemctl  (start|stop|restart|status) service_name

注:centos7系统兼容centos6的启动命令(即7中可以使用6的命令)。

 

4,设置开机启动或者关闭某个服务?

(centos6系统):

开机启动:chkconfig  –add  service_name  或者  chkconfig  service_name  on

开机关闭:chkconfig  –del   service_name  或者  chkconfig  service_name  off

(centos7系统):

开机启动:systemctl enable  service_name

开机关闭:systemctl disable  service_name

原文链接:https://www.cnblogs.com/huzhi/p/10787538.html
本文来源 互联网收集,文章内容系作者个人观点,不代表 本站 对观点赞同或支持。如需转载,请注明文章来源,如您发现有涉嫌抄袭侵权的内容,请联系本站核实处理。

© 版权声明

相关文章