查看 Docker 是否启动
使用 systemctl 命令查看 Docker 服务状态:
systemctl status docker
也可以使用以下命令快速判断是否启动。
systemctl is-active docker
若返回 “active” 表示已启动,返回 “inactive” 表示未启动。
使用 systemctl 命令查看 Docker 服务状态:
systemctl status docker
也可以使用以下命令快速判断是否启动。
systemctl is-active docker
若返回 “active” 表示已启动,返回 “inactive” 表示未启动。