This brief guide shows you how to list Docker containers and volumes using the command line.
Step 1: Open the Terminal
Access the terminal with Ctrl
+ Alt
+ T
or search for “Terminal” or “Konsole” in your system’s application menu.
Step 2: List Docker Containers
To list all running Docker containers, enter:
docker ps
To list all containers, including stopped ones, add the -a
or --all
flag:
docker ps -a
The output will display the container ID, image, command, creation time, status, ports, and container name.
Step 3: List Docker Volumes
To list all Docker volumes, enter:
docker volume ls
The output will show the volume driver, volume name, and other relevant information.
That’s it! You’ve learned how to list Docker containers and volumes using the command line. Regularly managing containers and volumes helps ensure a smooth and efficient Docker environment.