← 回到文章列表

Systemd 启动以及自启动程序

使某服务自动启动 systemctl enable httpd.service 使某服务不自动启动 systemctl disable httpd.service 检查服务状态 systemctl status httpd.service (服务详细信息) systemct…

使某服务自动启动 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
如果你原本在rc.local文件中写了东西,需要在systemd中调用
那么执行 systemctl enable rc-local.service\

在这里找找

输入关键词,找一篇过去的记录。