Welcome to the Environment Modules documentation portal. The Environment Modules package provides for the dynamic modification of a user's environment via modulefiles.
The Modules package is a tool that simplifies shell initialization and lets users easily modify their environment during a session using 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
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, fish, as well as some scripting languages such as tcl, perl, python, ruby, cmake and r.
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.
Modules presented here are ones that modify the shell or script execution environment. They should not be confused with language-specific modules (e.g., Perl modules, Python modules or R modules) that add specific capabilities to scripts.
Here is an example of loading a module on a Linux machine under bash.
$ module load gcc/9.4.0 $ which gcc $ /usr/local/gcc/9.4.0/linux-x86_64/bin/gcc
Now we'll switch to a different version of the module
$ module switch gcc gcc/10 $ which gcc /usr/local/gcc/10.3.0/linux-x86_64/bin/gcc
And now we'll unload the module altogether
$ module unload gcc $ which gcc gcc not found
Now we'll log into a different machine, using a different shell (tcsh).
% module load gcc/10.3 % which gcc /usr/local/gcc/10.3.0/linux-aarch64/bin/gcc
Note that the command line is exactly the same, but the path has automatically configured to the correct architecture.
Get started with Modules¶
Learn how to retrieve and install Modules on Unix or on Windows. An overlook on the new functionalities introduced by each version is available in the New features guide. Release notes provides the full list of changes added in each version. The Changes between versions document gives an in-depth view of the modified behaviors and new features between major versions.
A Cookbook of recipes describes how to use the various features of Modules and how to extend the module command to achieve specific needs.
If you have questions, comments or development suggestions for the Modules community, please read the Contributing guide.
Modules is distributed under the GNU General Public License, either version 2 or (at your option) any later version (GPL v2+).