FAQ: Environment
This section covers the UNIX
environment on HECToR and how you can
configure your environment to suit your needs.
- What is a module(file)?
- How can I check which modules are available?
- How can I check which modules have been loaded?
- How do I load the modules I need?
- How do I change one (version of a) particular module?
- How do I remove "." from my default PATH
- Q. What is a module(file)?
-
A. The
Linux
commandmodule
provides a command-line interface to the Modules software package, which allows you to dynamically modify your user environment by using modulefiles.Each modulefile contains the information needed to configure the shell for an application. After the Modules software package is initialized, the environment can be modified on a per-module basis using the
module
command, which interprets modulefiles.Typically, modulefiles instruct the
module
command to alter or set shell environment variables such asPATH
,MANPATH
, and others.The modulefiles can be shared by many users on a system, and users can have their own collection to supplement or replace the shared modulefiles.
(This information was adapted from the manpage
module(1)
). - Q. How can I check which modules are available?
-
A.
module avail
lists all available modulefiles in the currentMODULEPATH
. - Q. How can I check which modules have been loaded?
-
A.
module list
lists all modulefiles in your current environment. Issue this command just after login to see the defaults. - Q. How do I load the modules I need?
-
A.
module load modulefile [modulefile....]
- loadsmodulefile
into the shell environment.module show modulefile [modulefile...]
- displays information aboutmodulefile
; this lists the full path ofmodulefile
and all of the environment changesmodulefile
will make if loaded.
- Q. How do I change one (version of a) particular module?
-
A.
module switch modulefile1 modulefile2
- switches the loadedmodulefile1
tomodulefile2
without affecting other environment settings. - Q. How do I remove "." from my default PATH
-
For the convenience of users the default PATH on HECToR contains the current directory ("."). If you would rather not have the current directory in your default PATH then you can remove it by adding the following lines to your $HOME/.bashrc file:
# Remove . from path export PATH=`echo $PATH | sed -e 's/:\.:/:/' -e 's/:\.$//'`