How To Install initramfs-tools-core on Ubuntu 18.04

In this tutorial we learn how to install initramfs-tools-core on Ubuntu 18.04. initramfs-tools-core is generic modular initramfs generator (core tools)

Introduction

In this tutorial we learn how to install initramfs-tools-core on Ubuntu 18.04.

What is initramfs-tools-core

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.

There are three methods to install initramfs-tools-core on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install initramfs-tools-core Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install initramfs-tools-core using apt-get by running the following command:

sudo apt-get -y install initramfs-tools-core

Install initramfs-tools-core Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install initramfs-tools-core using apt by running the following command:

sudo apt -y install initramfs-tools-core

Install initramfs-tools-core Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install initramfs-tools-core using aptitude by running the following command:

sudo aptitude -y install initramfs-tools-core

How To Uninstall initramfs-tools-core on Ubuntu 18.04

To uninstall only the initramfs-tools-core package we can use the following command:

sudo apt-get remove initramfs-tools-core

Uninstall initramfs-tools-core And Its Dependencies

To uninstall initramfs-tools-core and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove initramfs-tools-core

Remove initramfs-tools-core Configurations and Data

To remove initramfs-tools-core configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge initramfs-tools-core

Remove initramfs-tools-core configuration, data, and all of its dependencies

We can use the following command to remove initramfs-tools-core configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge initramfs-tools-core

References

Summary

In this tutorial we learn how to install initramfs-tools-core package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.