GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
* Sign Up! *

Support
Customer Portal
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
ENVML(1) Modules ENVML(1)

envml - run a command in an environment setting up by Modules

envml [MODULE_ACTION]... [--] COMMAND [ARG]...

The envml command configures the environment using specified Environment Modules actions and then given command.

This is useful for running a command in a modified environment without permanently altering the current shell session.

envml interprets its first arguments as module actions, then switches to command execution after either encountering -- or determining that the remaining arguments form the actual command to run.

Each module action argument can be one of the following forms:

  • purge Unload all currently loaded modulefiles.
  • restore[=coll] Restore the module environment from the named collection coll. If no name is given, restores the default collection.
  • unload=mod1[&mod2...] Unload one or more specified modulefiles.
  • switch=mod1&mod2 Unload mod1 and load mod2.
  • [load=]mod1[&mod2...] Load one or more specified modulefiles. load= can be omitted.

Multiple MODULE_ACTIONs can be passed in a single argument using the colon (:) separator. The ampersand (&) is used to specify multiple modules in a single action.

Everything following the -- separator is treated as the command to execute in the modified environment.

If no -- separator is provided, envml assumes the first argument is a MODULE_ACTION and the remaining arguments form the command to execute.

Display usage information and exit.

Restore default module collection then run command arg1 arg2:

envml restore command arg1 arg2


Purge all modules, then load mod1 and mod2, and run the command:

envml purge:mod1:mod2 command arg1 arg2


Use the -- separator to avoid ambiguity:

envml restore load=mod1&mod2 -- command arg1 arg2


The envml command returns the exit status of the executed command or 1 if module action fails.

If the module command is not available in the shell (i.e., not a shell function), envml will print an error and exit.

module, ml, modulefile

1996-2025, Modules Contributors

2025-11-25 5.6.1

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.