systemctl的常用命令


#systemctl

#systemctl --all

#systemctl list-units --type=sokect

#systemctl list-units --type=service

type后面可以接的類型可以通過help查看

# systemctl -t help

Available unit types:

service

socket

target

device

mount

automount

snapshot

timer

swap

path

slice

scope。

命令大致有start,stop,restart,status,reload,enable,disable,is-enabled

#systemctl is-enabled xxx.service #查詢服務是否開機啟動

#systemctl enable xxx.service #開機運行服務

#systemctl disable xxx.service #取消開機運行

#systemctl start xxx.service #啟動服務

#systemctl stop xxx.service #停止服務

#systemctl restart xxx.service #重啟服務

#systemctl reload xxx.service #重新加載服務配置文件

#systemctl status xxx.service #查詢服務運行狀態

#systemctl --failed #顯示啟動失敗的服務


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM