fsck.ocfs2 command not found

In this troubleshooting guide we learn how to fix fsck.ocfs2 command not found error message

Introduction

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

fsck.ocfs2: command not found

or when using sudo you get the following error message

sudo: fsck.ocfs2: command not found

Solutions to fsck.ocfs2: command not found

How To Fix fsck.ocfs2: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu fsck.ocfs2 is provided by ocfs2-tools package.

ocfs2-tools is:

OCFS2 is a general purpose cluster filesystem. Unlike the initial release of OCFS, which supported only Oracle database workloads, OCFS2 provides full support as a general purpose filesystem. OCFS2 is a complete rewrite of the previous version, designed to work as a seamless addition to the Linux kernel.

This package installs the tools to manage the OCFS2 filesystem, including mkfs, tunefs, fsck, debugfs, and the utilities to control the O2CB clustering stack.

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

sudo apt-get -y install ocfs2-tools

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

You can also use apt command to install ocfs2-tools.

sudo apt -y install ocfs2-tools

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

sudo aptitude install ocfs2-tools

Summary

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