Skip to content

Modules

Modules can be loaded into your environment so that they become available to use. To check all available modules on the cluster, use the following command:

module avail 

Look for your software of interest, for example Python:

module avail | grep -i python

Now load the module

module load python/3.9.16

Info

Type python into the terminal. What version is being displayed? Is it the same as the module you loaded?

You can always unload the module

module unload python/3.9.16

Check which modules you have loaded:

module list

Report all the versions + detailed information for the modules that match the name

module spider python/3.9.16

Clear all loaded modules

module purge

Tip

Also take a look at the user-collections feature of lmod; it allows you to save a combination of loaded modules under a name, so you can quickly load this setup again later.

Note that module environment commands that are entered in a specific terminal window, are only effective within that terminal and its child processes. This makes it possible to run different versions of the same program in separate terminal windows.

If you want to have a certain environment always available when logging in, you can enter these commands in your ~/.bashrc file. This default environment will then be used for all terminals (shells) that are started after logging in.