CAEN Knowledge Base
CAEN Knowledge Base

Note: For updates from the College about resources for learning, teaching and working remotely due to the COVID-19 pandemic, visit:

Enter your question or keyword below to search our knowledge base. At any time, you can click the Blue button in the bottom-right corner of the page to open a Live Chat session with a CAEN consultant. If no consultant is available, you will be prompted to submit an offline message, and the next available consultant will contact you at the email address you provide.

How are Environment Modules used in the CLSE for Linux?

  • Environment modules enable users to modify their Linux environment dynamically
  • Modules can be loaded or unloaded using command-line programs
  • The CAEN Lab Software Environment  (CLSE) for Linux uses modules to specify which version of a software application one wishes to run
    • For example one can use the module avail command to display all available modules, or
    • Use the module load modulefile command to load a module

The Linux Environment Modules package is available on all computers running the CAEN Lab Software Environment (CLSE) for Linux. This enables students to change settings in their shell dynamically using the software modulefile that is pre-configured by CAEN. When one loads a modulefile, the shell will be configured with all variables needed by the application (e.g. PATH, CLASSPATH, MANPATH, or LD_LIBRARY_PATH).

To determine which software versions are available, use the module avail command. If additional arguments are not specified, the command will display a listing of all available modules:

The list of all modules available on a CAEN computer may be long. To refine a search, one may add an additional argument to specify the modules available for a specific application. For example, the command module avail python might produce this output:

If a module has multiple versions, one of them will be marked (default), as can be seen in the example above for python/2.7.13. The default module version is what will be loaded without specifying any version number when running an application.

To load a specific module version, use the module load modulefile command. Your shell will be modified to use the specified modulefile version. For example, in the exampl window below, the gcc/7.1.0 module is loaded. Prior to loading the modulefile, typing the gcc command would have run the version in /usr/bin. After loading the module, the user's PATH environment variable is modified such that the version of gcc in /usr/um/gcc-7.1.0 is run instead.

Before loading the CAEN gcc modulefile:

After loading the modulefile:

To restore your environment to its previous state, use the module unload modulefile command, or simply log out:

Read More About Environment Modules

For more information about the environment modules, commands, and usage, visit the SourceForge Environment Modules package project page or type man module or module --help at a command line.