init.lxc command not found

In this troubleshooting guide we learn how to fix init.lxc command not found error message

Introduction

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

init.lxc: command not found

or when using sudo you get the following error message

sudo: init.lxc: command not found

Solutions to init.lxc: command not found

How To Fix init.lxc: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu init.lxc is provided by liblxc-common package.

liblxc-common is:

Containers are insulated areas inside a system, which have their own namespace for filesystem, network, PID, IPC, CPU and memory allocation and which can be created using the Control Group and Namespace features included in the Linux kernel.

This package contains a few binaries and security profiles required by all liblxc users.

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

sudo apt-get -y install liblxc-common

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

You can also use apt command to install liblxc-common.

sudo apt -y install liblxc-common

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

sudo aptitude install liblxc-common

Summary

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