How To Install diffutils on AlmaLinux 8

In this tutorial we learn how to install diffutils in AlmaLinux 8. diffutils is A GNU collection of diff utilities

Introduction

In this tutorial we learn how to install diffutils on AlmaLinux 8.

What is diffutils

Diffutils includes four utilities compares two files and shows the differences, line by line. The cmp command shows the offset and line numbers where two files differ, or cmp can show the characters that differ between the two files. The diff3 command shows the differences between three files. Diff3 can be used when two people have made independent changes to a common original; diff3 can produce a merged file that contains both sets of changes and warnings about conflicts. The sdiff command can be used to merge two files interactively. Install diffutils if you need to compare text files.

We can use yum or dnf to install diffutils on AlmaLinux 8. In this tutorial we discuss both methods but you only need to choose one of method to install diffutils.

Install diffutils on AlmaLinux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install diffutils using dnf by running the following command:

sudo dnf -y install diffutils

Install diffutils on AlmaLinux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install diffutils using yum by running the following command:

sudo yum -y install diffutils

How To Uninstall diffutils on AlmaLinux 8

To uninstall only the diffutils package we can use the following command:

sudo dnf remove diffutils

References

Summary

In this tutorial we learn how to install diffutils on AlmaLinux 8 using yum and dnf.