To view running containers use below command:
docker ps
I you want to view all containers use the given command:
docker ps -a
If want to view latest created container (includes all states) use the given command:
docker ps -l
To show n last created containers (includes all states) use the given command:
docker ps -n=-1
To display total file sizes use the given command:
docker ps -s
The content presented above is from docker.com.
In the new version of Docker, commands are updated, and some management commands are added:
docker container ls
Is used to list all the running containers.
docker container ls -a
Is used to list all the containers created irrespective of its state.
I hope the above explanation would be helpful for you.