sdiff command not found

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

Introduction

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

sdiff: command not found

or when using sudo you get the following error message

sudo: sdiff: command not found

Solutions to sdiff: command not found

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

In Ubuntu sdiff is provided by diffutils package.

diffutils is:

The diffutils package provides the diff, diff3, sdiff, and cmp programs.

diff' shows differences between two files, or each corresponding file in two directories. cmp’ shows the offsets and line numbers where two files differ. cmp' can also show all the characters that differ between the two files, side by side. diff3’ shows differences among three files. `sdiff’ merges two files interactively.

The set of differences produced by diff' can be used to distribute updates to text files (such as program source code) to other people. This method is especially useful when the differences are small compared to the complete files. Given diff’ output, the `patch’ program can update, or “patch”, a copy of the file.

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

sudo apt-get -y install diffutils

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

You can also use apt command to install diffutils.

sudo apt -y install diffutils

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

sudo aptitude install diffutils

Summary

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