systemctl是centos7的服務管理工具中主要的工具,它融合之前service和chkconfig的功能于一體。
系統(tǒng)服務基本管理操作
- 啟動服務
systemctl start 服務名 - 停止服務
systemctl stop 服務名 - 重啟服務
systemctl restart 服務名 - 開機自啟
systemctl enable 服務名 - 開機禁啟
systemctl disable 服務名 - 查看狀態(tài)
systemctl status 服務名 - 查看服務是否開機啟動
systemctl is-enable 服務名
系統(tǒng)服務列表
- 查看已啟動的服務列表
systemctl list-unit-files|grep enabled - 查看啟動失敗的服務列表
systemctl --failed
以上為CentOS7系統(tǒng)服務基本管理操作常用命令。