当前位置: 代码迷 >> 综合 >> Linux---systemctl命令
  详细解决方案

Linux---systemctl命令

热度:66   发布时间:2024-01-18 09:29:14.0


        systemctl命令是系统服务管理器指令,它实际上将 service 和 chkconfig 这两个命令组合到一起。我这里就不介绍之前的了,只介绍新指令,如下:

任务 指令
使某服务自动启动 systemctl enable httpd.service
使某服务不自动启动 systemctl disable httpd.service
检查服务状态(详细) systemctl status httpd.service(服务详细信息)
检查服务状态 systemctl is-active httpd.service (仅显现是否Active)
显示所有已启动服务 systemctl list-units --type =service
启动某服务 systemctl start httpd.service
停止某服务 systemctl stop httpd.service
重启某服务 systemctl restart httpd.service
 

        最近接触运维的东西比较多,一下子就发现自己之前所了解的linux知识不够系统,需要加强。