Customizing Your Computing Environment with Modules
8. Loading Modules at Startup
The changes you make to your application environment using Modules are not saved when you log off. To make them persistent, you can add commands to a file in your home directory named .modules. If this file exists, its contents will be automatically sourced by the Environment Modules Package whenever you start a login shell. You can modify this file as needed to load, unload, or change the modules you would like enabled automatically.
A sample .modules file may have been provided for you in your home directory. This file usually contains example module load commands that are commented out. To activate any of them, remove the leading # character.
If a sample .modules file has not been provided, you can create one and add your module commands.