User Tools

Site Tools


Environment Modules

'modules' command

It is a shell function used as the client to load and unload provided environments.

Using provided environments

What environments are available?

$ module avail
------------------------------- /etc/environment-modules/modules --------------------------------
clang-llvm/7.0.1 cmake/3.8.0 gcc/6.5.0 rust/1.38.0
clang-llvm/9.0.0 gcc/4.9.4   gcc/7.4.0 swift/5.0.1
cmake/3.1.1      gcc/5.5.0   gcc/8.3.0

Loading an environment

$ module load clang-llvm/7.0.1

$ which clang

$ clang --version
clang version 7.0.1 (tags/RELEASE_701/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/clang-llvm/7.0.1/bin

Unloading an environment

$ module unload clang-llvm/7.0.1

$ which clang


This is where the function gets imported into your environment. It should be sourced by default and you should not have to worry about this. However, if for some reason, you do not have the 'module' function available to you, you might not be running a login shell or /etc/profile.d/ was not imported.

Known bugs


By default gnome-terminal does not start a login shell. There is a checkbox under Edit > Preferences > <profile name> > Command > 'Run command as a login shell' . Check that, and open a new terminal. The command should be available to you.

Assuming 'bash' as your shell but these directions should point any others in the right direction. You can also try source /etc/profile.d/ in your $HOME/.bashrc

/var/lib/dokuwiki/data/pages/nix/environmentmodules.txt · Last modified: 2019/10/15 12:48 by kauffman

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki