How To Install facter on Rocky Linux 8

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

Introduction

In this tutorial we learn how to install facter on Rocky Linux 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 Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install facter.

Install facter on Rocky Linux 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 Rocky Linux 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 Rocky Linux 8

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

sudo dnf remove facter

facter Package Contents on Rocky Linux 8

/usr/bin/facter
/usr/lib/.build-id
/usr/lib/.build-id/1e
/usr/lib/.build-id/1e/7f29c8088edbee2b48f5dbf8cbbbf1471c43cc
/usr/lib/.build-id/73
/usr/lib/.build-id/73/543443449925460b4a97ea437e9ff7d306728e
/usr/lib64/libfacter.so
/usr/lib64/libfacter.so.3.14.2
/usr/share/doc/facter
/usr/share/doc/facter/README.md
/usr/share/licenses/facter
/usr/share/licenses/facter/LICENSE
/usr/share/man/man8/facter.8.gz

References

Summary

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