Computing Environment

The component with which the user interacts is the command interpreter, more commonly called shell. It interprets interactive commands and program instructions (shell scripts). There are multiple shells (C Shell, Bash, K-Shell, ... ). By default the user shell is BASH.
To check which shell you have you can use the following command:

echo $SHELL
/bin/bash

If you need to change the shell type, first check the ones available on your system:

cat /etc/shells

And then change it to the one you want with the following command, to make it permanent:

chsh -s /bin/zsh



Environment variables are a set of values that define how system and user processes behave when running. Most operating system commands and tools, as well as the programs that the user uses in his work, query the value of certain environment variables to access information they need to know in order to run correctly. To query the variables that a user has defined in his environment, he can use the env command.

The command displays the list of defined variables and their value in the form VARIABLE=value. For example, the value of the variables $MANPATH, $PATH and $HOME:

MANPATH=/usr/share/man/en:/usr/share/man:/usr/local/share/man
PATH=/opt/jre1.7.0_21/bin:/usr/local/bin:/bin:/usr/bin
HOME=/home/user

Environment variables that support a list of different values, in the above example MANPATH and PATH, these values must be separated by the ‘:’ character. Users can define their own environment variables using the export command:

export TMPDIR=/home/user/tmp

To change the value of an already defined environment variable, it is possible to use the current value of the variable to define the new value. For example, to add a new path to the variable PATH the command would be:

export PATH=/home/user/tmp:$PATH

Where the new path /home/user/tmp’ is added to the paths already stored in the $PATH variable.



Closely related to environment variables are startup scripts. These scripts allow the user to customize his working environment to automatically adapt it to the use of the most commonly used programs or utilities. It is not the purpose of this introduction to go into detail on the different types of shell or command interpreter startup on a Linux system, so here are some simple instructions.

A Linux shell can be invoked in three different ways:

  • In login shells and interactive shells the user interacts with the operating system through terminals.
  • Non-interactive shells are those that execute scripts and do not interact with the user.

For the purposes of this manual, the only important thing to note is that each of these shell execution types uses different startup scripts.

As detailed above, by default all users are assigned a shell, Bash. In Bash login shell, launched via the ssh command, execute one of the following files located in the user's $HOME directory (the first one that exists):

  • .bash_profile
  • .bash_login
  • .profile

In shells that do not perform a login, for example shells launched with the bash command, the bashrc file is executed, also located in the $HOME directory.



To facilitate the use of the various programs, tools and libraries that are installed on the system, SCAYLE uses the Environment Modules utility. This tool allows you to easily define all the necessary parameters for a program to work properly. By executing a single command, you can define all the environment variables, aliases, and paths necessary for the execution of the desired program.


To check the list of available software in the utility modules, we will use the command module avail:

# module avail
------------------------------------------- /soft/calendula2/modulefiles -------------------------------------------
broadwell/singularity_2.5.2   haswell/mdynamix_5.2.8_intel18       haswell/singularity_3.1.1
broadwell/singularity_3.0.0   haswell/netcdf_4.6.1_intel18         haswell/smilei_4.1
broadwell/singularity_3.1.1   haswell/openmpi_2.1.2                haswell/su2_6.2.0_intel18
haswell/bowtie2_2.3.4.3       haswell/openmpi_3.1.2_gcc8.2.0       haswell/tophat2_2.1.1
haswell/bowtie2_2.3.5.1       haswell/openmpi_3.1.2_gcc8.2.0_pmix  sandybridge/gcc_8.2.0
haswell/bwa_0.7.17            haswell/orca_4.0.1                   sandybridge/hdf5_1.8.19_intel18
haswell/FFmpeg_4.1.3_intel18  haswell/orca_4.1.2                   sandybridge/nektar++_4.4.0_intel18
haswell/gcc_8.2.0             haswell/qespresso_6.3_intel18        sandybridge/nektar++_4.4.1_intel18
haswell/GDAL_2.4.1_intel18    haswell/samtools_1.7                 sandybridge/netcdf_4.6.1_intel18
…

To define the variables and paths needed to run one of the above programs, we will use the command module load:

module load archivo_modules

por ejemplo:

module load haswell/smilei_4.1

To check what modifications this command module show makes to the environment:

module show haswell/smilei_4.1
-------------------------------------------------------------------
/soft/calendula2/modulefiles/haswell/smilei_4.1:

module-whatis   Environment variables for Smilei v4.1
module load     haswell/hdf5_1.8.19_intel18
prepend-path    PATH /soft/calendula2/haswell/Smilei/4.1
prepend-path    PATH /soft/calendula2/haswell/Smilei/miniconda3/bin
-------------------------------------------------------------------

<p>
<br />
</p>

Last update: 06/02/2025 12:46