The "module" command does not work in the Terminal on a CLSE Linux computer. How can I fix this?

If you see a "command not found" error when using the module command on a CLSE Linux workstation, it may be due to a setting within the Terminal application:

terminal image with module command not found error

Click Terminal >> Preferences to review the app settings:

Terminal application preferences menu

Navigate to Profiles, and review the Command section. Click the box labeled Run command as a login shell:

Command preferences menu, with run command as a login shell box checked

Then close and re-open the Terminal.

 

Alternatively, you can try adding the following to your .bashrc file

if [ -z "$LMOD_CMD" ]

then . /etc/profile

fi

One way of doing it for example would be to paste this in your shell:

cat - .bashrc > .bashrc <<EOF
if [ -z $LMOD_CMD ]
then . /etc/profile
fi
EOF