---
name: "modulecmd"
section: "1"
platform: "linux"
package: "environment-modules"
version: "5.7.0-3"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/modulecmd"
---

# modulecmd(1)

generic wrapper pointing to Modules execution engine

## NAME

modulecmd - generic wrapper pointing to Modules execution engine

## SYNOPSIS

**modulecmd** *shell* \[*switches*\] \[*sub-command* \[*sub-command-args*\]\]

## DESCRIPTION

The **modulecmd** command is a generic wrapper pointing to Modules execution engine **modulecmd.tcl**.

The **modulecmd.tcl** command is the low-level execution engine of the Environment Modules system. It is responsible for evaluating modulefile logic and emitting shell-specific commands that modify the user's environment.

Unlike the user-facing **module** command, **modulecmd.tcl** does not directly alter the environment. Instead, it writes shell code to standard output, which must be evaluated by the calling shell.

The **module** shell function or wrapper script invokes **modulecmd.tcl** internally and evaluates its output to apply environment changes.

The following shells are supported: sh, csh, tcsh, bash, ksh, zsh, fish, cmd, pwsh, python, perl, ruby, tcl, cmake, r and lisp.

See the Modulecmd startup \<#modulecmd-startup\>, Command line switches \<#command-line-switches\> and Module Sub-Commands \<#module-sub-commands\> sections in the module \<#module-1\> man page.

Direct invocation of **modulecmd** is primarily intended for debugging and advanced usage. End users should normally use the **module** command instead.

## EXIT STATUS

**modulecmd** exits with **0** on successful execution. Otherwise **1** is returned.

## ENVIRONMENT

See the ENVIRONMENT \<#module-environment\> section in the module \<#module-1\> man page.

## FILES

See the FILES \<#module-files\> section in the module \<#module-1\> man page.

## SEE ALSO

envml \<#envml-1\>, ml \<#ml-1\>, module \<#module-1\>, modulefile \<#modulefile-5\>

## Copyright

1996-2026, Modules Contributors
