linux设置服务开机自启

  linux 通过systemctl指令,设置不同的参数对服务进行操作。

systemctl  start      服务名                    启动服务
systemctl  stop       服务名                    停止服务
systemctl  restart    服务名                    重启服务
systemctl  enable     服务名                    使某服务开机自启
systemctl  disable    服务名                    关闭某服务开机自启
systemctl  status     服务名                    查看服务状态
systemctl  list -units --type=service    列举所有已启动服务            

 

posted @ 2022-05-26 12:58  不要西红柿  阅读(793)  评论(0编辑  收藏  举报