Ubuntu systemctl 服务管理

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 stop nginx.service

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

systemctl list -units --type=service

你可能感兴趣的:(Ubuntu systemctl 服务管理)