CentOS 7.2 - 系統管理 - 列出所有service

列出所有enabled, active的service:
systemctl list-units --type=service

列出所有service,不論active還是inactive又或者是failed和not-found:
systemctl list-units --type=service --all

列出所有已安裝的service,不論有沒有運行,不論有沒有設置爲系統啓動項,不論服務是否還有效:
systemctl list-unit-files --type=service

備註:
一般安裝的service file可能會有4中狀態:

  • enabled 安裝了的,並會隨系統啓動而啓動。
  • static Enabled服務啓動時需要同時啓動的依賴服務。
  • disabled 已安裝,但不可隨系統啓動而同時啓動的服務。
  • invalid 無效的
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章