The ctr command is a utility in Linux that is used to control and monitor containerd, a daemon that manages containers on a host. Containerd is a lightweight container runtime that provides an API for managing the life cycle of containers and offers a variety of features such as image management, storage, and networking.
To list all the containers including running and stopped use the below command:
# ctr containers list
This will list all of the containers managed by containerd on the host.
ctr Command Examples
1. List all containers (running and stopped):
# ctr containers list
2. List all images:
# ctr images list
3. Pull an image:
# ctr images pull image
4. Tag an image:
# ctr images tag source_image:source_tag target_image:target_tag