systemctl

启动、停止、开机自启动

  1. 启动
    通过systemctl start 来启动
    sudo systemctl start test.service
    1
  2. 停止
    通过systemctl stop 来停止
    sudo systemctl stop test.service
    1
  3. 重启
    通过systemctl restart 来重启
    sudo systemctl restart test.service
    1
  4. 开启开机自启动
    通过systemctl enable 来开启开机自启动
    sudo systemctl enable test.service
posted @ 2022-10-10 16:42  Arborblog  阅读(19)  评论(0编辑  收藏  举报