e2fsck command not found

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

Introduction

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

e2fsck: command not found

or when using sudo you get the following error message

sudo: e2fsck: command not found

Solutions to e2fsck: command not found

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

In Ubuntu e2fsck is provided by e2fsprogs package.

e2fsprogs is:

The ext2, ext3 and ext4 file systems are successors of the original ext (“extended”) file system. They are the main file system types used for hard disks on Debian and other Linux systems.

This package contains programs for creating, checking, and maintaining ext2/3/4-based file systems. It also includes the “badblocks” program, which can be used to scan for bad blocks on a disk or other storage device.

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

sudo apt-get -y install e2fsprogs

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

You can also use apt command to install e2fsprogs.

sudo apt -y install e2fsprogs

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

sudo aptitude install e2fsprogs

Summary

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