systemctl 命令完全指南

2021-09-27 08:34:56 字數 374 閱讀 9765

參考文章:

systemctl start redis.service #啟動redis伺服器

systemctl stop redis.service #停止redis伺服器

systemctl restart redis.service #重新啟動redis伺服器

systemctl status redis.service #獲取redis伺服器的執行狀態

systemctl enable redis.service #開機啟動redis伺服器

systemctl disable redis.service #開機禁用redis伺服器

為什麼可以使用systemctl命令就可以啟動服務了呢?

systemctl 命令用法

systemctl 是管 務的主要工具,它整合了chkconfig 與 service功能於一體。注 代表某個服務的名字,如http的服務名為httpd 例如在centos 7 上安裝http 啟動服務 等同於service httpd start 停止服務 等同於service httpd sto...

服務管理 systemctl命令

任務舊指令 新指令使某服務自動啟動 使某服務不自動啟動 檢查服務狀態 systemctl status httpd.service 服務詳細資訊 systemctl is active httpd.service 僅顯示是否 active 顯示所有已啟動的服務 chkconfig list syst...

服務管理 systemctl命令

啟動乙個服務 systemctl start postfix.service 關閉乙個服務 systemctl stop postfix.service 重啟乙個服務 systemctl restart postfix.service 顯示乙個服務的狀態 systemctl status postf...