ENVML(1)
π
ENVML(1) β the envml page, but make it make sense π
okay bestie, welcome to page one of Modules (like, section 1 of the manual, we're fancy like that) and honestly this one's a little gem. let's get into it β¨
πΈ NAME πΈ
envml β run a command inside an environment that Modules set up for u π«Ά
π¦ SYNOPSIS π¦
envml [MODULE_ACTION]... [--] COMMAND [ARG]...
like, module actions first, then ur actual command. simple. iconic. periodt π
π DESCRIPTION π
so the envml command configures the environment using whatever Environment Modules actions u give it, and then runs the given command. that's the whole vibe.
it's literally made for running a command in a modified environment without permanently altering ur current shell session. no cap, ur shell stays untouched. main character energy for the command, nothing for ur session π
and here's how it decides stuff: envml interprets its first arguments as module actions, then switches over to command execution after either hitting -- or determining that the remaining arguments form the actual command to run. like a vibe check, but for argv.
β¨ MODULE_ACTION FORMAT β¨
each module action argument can be one of these forms, ok? one bullet each, no skipping:
purgeβ unload all currently loaded modulefiles. all of them. bye πrestore[=coll]β restore the module environment from the named collection coll. if u don't give a name, it restores the default collection. defaults slay.unload=mod1[&mod2...]β unload one or more specified modulefiles.switch=mod1&mod2β unloadmod1and loadmod2. a swap. a glow-up π[load=]mod1[&mod2...]β load one or more specified modulefiles. and guess what,load=can be omitted entirely. lowkey convenient.
multiple MODULE_ACTIONs can be passed in a single argument using the colon (:) separator. and the ampersand (&) is what u use to specify multiple modules in a single action. : between actions, & between modules. that's the whole alphabet soup, iykyk π
π₯ COMMAND EXECUTION π₯
everything following the -- separator is treated as the command to execute in the modified environment. everything. no exceptions.
and if no -- separator is provided? envml assumes the first argument is a MODULE_ACTION and the remaining arguments form the command to execute. so like, it's guessing a little, which is why -- is ur bestie π
π OPTIONS π
--help,-hβ display usage information and exit. that's it. that's the only option. she's minimal π
β EXAMPLES β
restore the 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 (highkey recommended):
envml restore load=mod1&mod2 -- command arg1 arg2
π EXIT STATUS π
the envml command returns the exit status of the executed command, or 1 if a module action fails. so if ur command's fine, u get its status. if the module action flops, u get 1. not me getting a 1 π
π DIAGNOSTICS π
if the module command is not available in the shell (i.e., it's not a shell function), envml will print an error and exit. so like, make sure module actually exists as a shell function first, bestie. otherwise it's over before it started π§
π SEE ALSO π
module <#module-1>, modulecmd <#modulecmd-1>, ml <#ml-1>, modulefile <#modulefile-5> β go read ur siblings, they're all slaying in their own ways π
π Copyright π
1996-2026, Modules Contributors β legends, fr fr π«Ά
okay that's the whole page!! written by the Modules Contributors, version 5.7.0, dated 2026-09-21, and that's on ENVML(1). go run something in a modified environment, u got this πβ¨
π¦ where this page comes from
- arch rolling: environment-modules 5.7.0-3 Β· GPL-2.0-or-later
- centos-stream 10: environment-modules 5.7.0-1.el10 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms