How To Install facter on AlmaLinux 8

In this tutorial we learn how to install facter in AlmaLinux 8. facter is Command and ruby library for gathering system information

Introduction

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

What is facter

Facter is a lightweight program that gathers basic node information about the hardware and operating system. Facter is especially useful for retrieving things like operating system names, hardware characteristics, IP addresses, MAC addresses, and SSH keys. Facter is extensible and allows gathering of node information that may be custom or site specific. It is easy to extend by including your own custom facts. Facter can also be used to create conditional expressions in Puppet that key off the values returned by facts.

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

Install facter 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 facter using dnf by running the following command:

sudo dnf -y install facter

Install facter 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 facter using yum by running the following command:

sudo yum -y install facter

How To Uninstall facter on AlmaLinux 8

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

sudo dnf remove facter

References

Summary

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