Linux下systemctl 的用法

1、啓動服務
systemctl start *.service

2、停止服務
systemctl stop *.service

3、重啓服務
systemctl restart *.service

4、重新加載服務配置文件
systemctl reload *.service

5、開機運行服務
systemctl enable *.service

6、取消開機運行
systemctl disable *.service

7、查詢服務是否開機啓動
systemctl is-enabled *.service

8、查詢服務運行狀態
systemctl status *.service

9、顯示啓動失敗的服務
systemctl --failed

注:*代表某個服務的名字,如http的服務名爲httpd

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章