ctr command not found

In this troubleshooting guide we learn how to fix ctr command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

ctr: command not found

or when using sudo you get the following error message

sudo: ctr: command not found

Solutions to ctr: command not found

How To Fix ctr: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu ctr is provided by containerd package.

containerd is:

Containerd is a daemon to control runC, built for performance and density. Containerd leverages runC’s advanced features such as seccomp and user namespace support as well as checkpoint and restore for cloning and live migration of containers.

This package contains the binaries.

To fix this problem, we can install more using the command below.

sudo apt-get -y install containerd

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install containerd.

sudo apt -y install containerd

Or if you have aptitude installed you can use the following command.

sudo aptitude install containerd

Summary

In this tutorial we learn how to fix ctr command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.