5. Module Commands

The module command is the user interface to the Modules Package. Below is a listing of some commonly used module commands and their descriptions.

Listing of Module Commands
Command Description
module avail [path...] List all modulefiles available on the system. If an argument is given, only the modulefiles whose pathname begins with the argument are displayed.
module list List the modulefiles currently loaded in the shell environment.
module help modulefile Print help information for the modulefile specified in the argument.
module display modulefile Displays the changes that are made to the environment when the specified modulefile is loaded.
module load modulefile Interprets the commands contained within the specified modulefile to configure your user environment.
module switch modulefile1 modulefile2 Removes the environment changes made by modulefile1 and makes the changes specified in modulefile2.
module unload modulefile Removes the environment changes made by modulefile.


These commands will enable you to get started using modules. If you are curious about the additional capabilities of the module command, see the SourceForge Module Command manpage.

icon indicating an exercise

Exercises


Given the module commands listed above, complete the following exercises by entering the appropriate command on your system's command line:

Exercise 1: List all of the modulefiles available on your system.


Exercise 2: List the modulefiles available on your system whose pathname begins with the letter 'm'.


Exercise 3: List the modulefiles that have already been loaded into your shell environment.


Exercise 4: Select one of the modulefiles available on your system and display the help information for it.


Exercise 5: Select one of the modulefiles on your system and display the changes it will make to the environment when it is loaded



Next, you will learn how to use the module command to configure your software environment.