Skip to main content
The HPCC clusters run Linux. If you’ve never used a Linux shell before, this page covers the commands you’ll use every day. If you’re already comfortable with the command line, skip ahead to Software & modules or Job submission.

The shell prompt

After logging in, you’ll see a prompt like:
The ~ means you’re in your home directory (/global/u/<username>). Everything after $ is where you type.

Managing files

rm on Linux is permanent; there is no trash folder or Recycle Bin. Double-check paths before deleting, especially with wildcards (rm *.log).

Viewing file contents

Searching

File permissions

Every file has an owner, a group, and a permission string like -rw-r--r--. The three groups of rwx bits map to owner, group, and others.
SLURM scripts must be readable by the scheduler but don’t have to be executable. sbatch handles that. If you call them directly (./script.sh), you do need chmod +x.

Text editors

Nano is the easiest to learn because it shows commands at the bottom:
Vim is more powerful but has a learning curve:

Redirects and pipes

Examples:

Variables and the environment

Important environment variables already set on HPCC nodes:

Disk usage

Process management

Do not run compute jobs on the login (head) node. Long-running processes found there will be killed and the account may be suspended. Use sbatch for batch jobs or srun --pty for interactive compute sessions.

Archiving and compression

Shell history and shortcuts

Basic bash scripting

A script is just a sequence of commands in a file:
Run it:
SLURM scripts are bash scripts with #SBATCH comment-directives at the top. See Job submission for complete templates.

Next steps

Software & modules

Load compilers, MPI, Python, and scientific applications.

Job submission

Write and submit your first SLURM job.