Home>Article>Operation and Maintenance> How to check whether docker is running in linux

How to check whether docker is running in linux

WBOY
WBOY Original
2022-06-22 16:43:23 8184browse

In Linux, you can use the systemctl command to check whether docker is running. This command is used for service management. The services managed by the systemctl command can be viewed in "/usr/lib/systemd/system", and the syntax is " systemctl status docker".

How to check whether docker is running in linux

The operating environment of this tutorial: linux7.3 system, docker version 19.03, Dell G3 computer.

How to check whether docker is running in Linux

The method to check whether the docker service has been started through the command line is as follows:

Check the running status of docker

systemctl status docker

systemctl Management command

Basic syntax:

systemctl [start | stop | restart | status] 服务名

The service managed by the systemctl command is in /usr/lib/systemd/system View

The output is as follows:

How to check whether docker is running in linux

Extension:

Start dockersystemctl start docker

Close dockersystemctl stop docker

Recommended learning: "docker video tutorial"

The above is the detailed content of How to check whether docker is running in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn