How To Install environment-modules on AlmaLinux 8

In this tutorial we learn how to install environment-modules in AlmaLinux 8. environment-modules is Provides dynamic modification of a user’s environment

Introduction

In this tutorial we learn how to install environment-modules on AlmaLinux 8.

What is environment-modules

The Environment Modules package provides for the dynamic modification of a user’s environment via modulefiles. Each modulefile contains the information needed to configure the shell for an application. Once the Modules package is initialized, the environment can be modified on a per-module basis using the module command which interprets modulefiles. Typically modulefiles instruct the module command to alter or set shell environment variables such as PATH, MANPATH, etc. modulefiles may be shared by many users on a system and users may have their own collection to supplement or replace the shared modulefiles. Modules can be loaded and unloaded dynamically and atomically, in an clean fashion. All popular shells are supported, including bash, ksh, zsh, sh, csh, tcsh, as well as some scripting languages such as perl. Modules are useful in managing different versions of applications. Modules can also be bundled into metamodules that will load an entire suite of different applications. NOTE have access to the module alias.

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

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

sudo dnf -y install environment-modules

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

sudo yum -y install environment-modules

How To Uninstall environment-modules on AlmaLinux 8

To uninstall only the environment-modules package we can use the following command:

sudo dnf remove environment-modules

References

Summary

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