共計 347 個字符,預計需要花費 1 分鐘才能閱讀完成。
在 CentOS 7 中,您可以使用 systemctl 命令來查看服務的狀態。以下是一些常用的 systemctl 命令:
- 查看所有服務的狀態:
systemctl list-units --type=service
- 查看特定服務的狀態:
systemctl status <service_name>
例如,要查看 Apache 服務的狀態,您可以運行:
systemctl status httpd
- 查看所有正在運行的服務:
systemctl list-units --type=service --state=running
- 查看所有已停止的服務:
systemctl list-units --type=service --state=inactive
請注意,要運行這些命令,您需要具有 root 或 sudo 權限。
丸趣 TV 網 – 提供最優質的資源集合!
正文完