systemctl命令

一、什么是systemctl命令

  systemctl命令是系统服务管理器指令,它实际上将 service 和 chkconfig 这两个命令组合到一起

二、常用命令

以nginx为例:

1.启动nginx服务

systemctl start nginx.service

2.设置开机自启动

systemctl enable nginx.service

3.停止开机自启动

systemctl disable nginx.service

4.查看服务当前状态

systemctl status nginx.service

5.重新启动某服务

systemctl restart nginx.service

6.查看所有已启动的服务

systemctl
原文地址:https://www.cnblogs.com/756623607-zhang/p/9247276.html