mkinitramfs command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
mkinitramfs: command not found
or when using sudo you get the following error message
sudo: mkinitramfs: command not found
Solutions to mkinitramfs: command not found
How To Fix mkinitramfs: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu mkinitramfs is provided by initramfs-tools-core package.
initramfs-tools-core is:
This package contains the mkinitramfs program that can be used to create a bootable initramfs for a Linux kernel. The initramfs should be loaded along with the kernel and is then responsible for mounting the root filesystem and starting the main init system.
To fix this problem, we can install more using the command below.
sudo apt-get -y install initramfs-tools-core
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install initramfs-tools-core.
sudo apt -y install initramfs-tools-core
Or if you have aptitude installed you can use the following command.
sudo aptitude install initramfs-tools-core
Summary
In this tutorial we learn how to fix mkinitramfs command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.