目 录CONTENT

文章目录

systemctl 基本操作

过客
2021-07-15 / 0 评论 / 0 点赞 / 6 阅读 / 0 字

以nginx服务为例

启动服务

systemctl start nginx

关闭服务

systemctl stop nginx

重启服务

systemctl restart nginx

显示服务的状态

systemctl status nginx

在开机时启用服务

systemctl enable nginx

在开机时禁用服务

systemctl disable nginx

查看服务是否开机启动

systemctl is-enabled nginx

查看已启动的服务列表

systemctl list-unit-files|grep enabled

查看启动失败的服务列表

systemctl --failed
0
  1. 支付宝打赏

    qrcode alipay
  2. 微信打赏

    qrcode weixin

评论区