Linux就该这么学 -- 命令 -- systemctl

在Centos7以后Linux启动方式已经用systemd取代init了,systemd主要是经过systemctl这个系统服务管理指令来处理spa

语法格式:rest

systemctl [参数] [服务]ci

经常使用参数:it

-start    启动服务 systemctl start httpd
-stop    中止服务 systemctl stop httpd
-restart         重启服务 systemctl restart httpd
-enable 将服务加入到开机自启中 systemctl enable httpd
-disable 将服务移出开机自启 systemctl disable httpd
-status 查看该服务的状态 systemctl status httpd
-list -units --type=service 列举全部已启动服务 systemctl list-units --type=service
相关文章
相关标签/搜索