lmod commands not found

If you are using bash on a Centos host it is recommended you add this to the top of it:

 

if [ -f /etc/bashrc ]; then
   . /etc/bashrc
fi


You can determine if you are using bash by doing:

 

echo "$SHELL"

 

You can also try the following:

 

If you get a "command not found" type of error when trying a command like module load matlab you might need to make sure the terminal/shell is a 'login' shell.

First, look at the top of the terminal/shell window.

If the Title of the window looks like this image then jump to the Konsole info

 

Title of terminal/shell window. In this case it is a Konsole terminal from the KDE desktop.

 

Otherwise, if it looks like this, start here.

Title of terminal/shell window. In this case, a "plain" terminal.

Under Edit-->Preferences there should be a choice to open the terminal/shell as a 'login' shell.

 

Terminal Preferences Menu with Command section highlighted in red

 

Now select "Run command a login shell"

 

Terminal Preferences window with Command select highlighted with a read rectangle and the "Run command as login shell" button is checked

 

Close that terminal and open a new one.

The lmod commands should now be properly sourced and available.

 

 

 

 

For the Konsole Terminal from the KDE desktop you need to do the following.

 

Clickin on the Settings menu item.

Click on Settings menu item

 

Click on Edit Current Profile...

Click on the "Edit Current Profile" menu item

 

Select the General menu tab. Note the Command input field. It shows the shell to start in the terminal. In this case it is /bin/bash

General menu tab with the Command input box highlighted by a red rectangle. Showing the value of "/bin/bash"

 

Add the "-l" flag /bin/bash. If you are using another shell like tcsh or zsh use the same flag. This will create a shell that is a "login shell".

Command input field highlighted with a red rectangle. The field has the text "/bin/bash -l"

 

Next, click the Apply button.

Window with a red arrow pointing to the Apply button that is highlighted by a red rectangle.

 

Click on the Ok button.

Window with a red arrow pointing to the Ok button that is highlighted by a red rectangle.

 

Close that terminal and open a new one.

The lmod commands should now be properly sourced and available.

Last modified: 2020/10/27 09:43:40.950043 GMT-4 by joseph.r.kline.1
Created: 2020/04/03 11:27:35.828739 GMT-4 by joseph.r.kline.1.

Categories

Search the Knowledge Base

Include:

Quick search results

    Admin Options: Edit this Document