To be a better coder
分类: LINUX
2019-11-12 10:53:00
systemctl list-unit-files --type service |grep enabled
systemctl list-unit-files --type service |grep service_name
(centos6系统):service service_name (start|stop|restart|status)
(centos7系统):systemctl (start|stop|restart|status) service_name
注:centos7系统兼容centos6的启动命令(即7中可以使用6的命令)。
(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