How To Install hwloc on AlmaLinux 8

In this tutorial we learn how to install hwloc in AlmaLinux 8. hwloc is Portable Hardware Locality - portable abstraction of hierarchical architectures

Introduction

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

What is hwloc

The Portable Hardware Locality (hwloc) software package provides a portable abstraction (across OS, versions, architectures, …) of the hierarchical topology of modern architectures, including NUMA memory nodes, shared caches, processor sockets, processor cores and processing units (logical processors or “threads”). It also gathers various system attributes such as cache and memory information. It primarily aims at helping applications with gathering information about modern computing hardware so as to exploit it accordingly and efficiently. hwloc may display the topology in multiple convenient formats. It also offers a powerful programming interface (C API) to gather information about the hardware, bind processes, and much more.

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

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

sudo dnf -y install hwloc

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

sudo yum -y install hwloc

How To Uninstall hwloc on AlmaLinux 8

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

sudo dnf remove hwloc

References

Summary

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