#systemctl is-enabled servicename.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 #顯示啓動失敗的服務
注:xxx代表某個服務的名字,如mysql的服務名爲mysqld