Welcome to the Environment Modules Project

What are 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 and python.

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.

Quick Examples

Here is an example of loading a module on a Linux machine under bash.

% module load gcc/3.1.1
% which gcc

Now we'll switch to a different version of the module

% module switch gcc gcc/3.2.0
% which 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).

tardis-> module load gcc/3.1.1
tardis-> which gcc

Note that the command line is exactly the same, but the path has automatically configured to the correct architecture.


modulecmd.tcl version 1.144 released
modules-3.2.10 released (NEWS)

Where to find the source code

There are two versions of the Environment Modules package. An experimental version is written in Tcl. The stable traditional version is written in C. Both versions use the same modulefiles and command line syntax, with the exception that the Tcl version can use an abbreviated version of the "switch" command.

Tcl Version (beta). You must have tclsh somewhere in your default $PATH, version 8.0 or newer; in addition, you must install the files in the init directory someplace that all of your users/systems can access (i.e., there is no automated install for the Tcl version as yet).


C version (released versions). This version requires compilation and linking with the libtcl*.a libraries. The first link is the main site; the others are mirrors.


SourceForge has a nifty feature called "Monitoring" which allows you to be notified when a project releases new files. For more information or to sign up, go to http://sourceforge.net/projects/modules and under "Latest File Releases" click on the envelope icon.

You will need Tcl (and optionally TclX - Extended Tcl) installed to compile and install Modules. Information and the Tcl package can be found at ActiveState Corporation.



About Modules

About Modules contributed / based tools


Contributed and Related

Modulefile examples are forthcoming.

Related Tools

The OSCAR Cluster Project uses modules along with a tool called switcher. Read about switcher and modules in section 2.9 of the OSCAR Cluster User's Guide.

SEPP is the Software Deployment System which is being developed by Tobias Oetiker, working for the IT Support Group of the Department of Electrical Engineering at the Swiss Federal Institute of Technology in Zurich.

Env2 is a Perl script to convert environment variables between scripting languages. For example, convert a csh setup script to bash or the other way around. Supports bash, csh, ksh, modulecmd, perl, plist, sh, tclsh, tcsh, vim, yaml, and zsh. This package is written and maintained by David C. Black.

Reference Installations

The working group TIOS (Tele-Informatics Open Systems) at Univerity of Twente, The Netherlands, uses Modules to manage the workstation software. (Note: currently returning a "403 Forbidden" error.)

The NERSC - The National Energy Research Scientific Computing Center has a great introduction and help page: Modules Approach to Environment Management.

Contact Information

For information on how to subscribe/unsubscribe to/from the modules mailing list, see the Mailing List page.

For problems or suggestions concerning the web pages please contact the Modules webmaster


Thanks to SourceForge for providing resources for modules.

SourceForge Logo

Legal Stuff

Modules is covered by the GNU General Public License (version 2). Please see the file "LICENSE.GPL" in the distribution for more information, or visit gnu.org to read the GNU General Public License online.


Copyright 1996-1999 John L. Furlani & Peter W. Osel. All rights reserved.
Trademarks used are the property of their respective owners.
Sat Oct 1 15:56:02 PDT 2011