We can list both running and stopped containers.
Ensure that the Docker daemon is running on the host and can be connected through the Docker client. You will also need a few running and/or stopped containers.
To list the containers, either run the following command:
docker container ls [OPTIONS]
Or run the following legacy command:
docker ps [OPTIONS]