Tips & Tools
Useful tools and practices for working on the cluster
The cluster comes with a number of modern command-line tools pre-installed on the head node. No modules or special setup needed – they’re ready to use.
Shell enhancements
The head node comes with several shell integrations pre-configured for all users:
| Tool | What it does |
|---|---|
| starship | Modern prompt showing git status, R version, Slurm job info, and more |
| zoxide | Smarter cd — use z to jump to frequently visited directories |
| fzf | Fuzzy finder — press Ctrl+R for interactive command history search |
| direnv | Automatically loads per-project environment variables from .envrc files |
These are initialized automatically on login. You’ll notice the new prompt immediately.
Additional CLI tools available (no setup needed, just use them):
| Tool | What it does | Replaces |
|---|---|---|
bat |
cat with syntax highlighting |
cat |
rg |
Fast text search | grep |
fd |
Fast file finder | find |
sd |
Find and replace in files | sed |
delta |
Better git diffs | git diff |
eza / lsd |
Modern directory listing with colors | ls |
dust / dua |
Disk usage analyzer | du |
jq |
JSON processor | — |
glow |
Render Markdown in terminal | — |
micro |
Modern terminal editor (Ctrl+S/C/V) | nano |
yazi |
Terminal file manager | — |
procs |
Process viewer with tree display | ps |
tldr |
Simplified man pages with examples | man |
z instead of cd
After visiting a directory once (cd /srv/home/you/projects/my-analysis), zoxide remembers it. Next time, just type z my-analysis from anywhere.
If you prefer your own shell setup, create ~/.skip-cluster-tools to disable the pre-configured integrations:
touch ~/.skip-cluster-toolsThis disables starship, zoxide, fzf keybindings, and direnv. The CLI tools (bat, rg, fd, etc.) remain available regardless.
Text editors
If you need to quickly edit a file on the cluster (a script, a config file, your ~/.bashrc), these terminal-based editors are available.
nano
The simplest editor. If you’ve never used a terminal editor before, start here.
nano my_script.RCommands are shown at the bottom of the screen. The ^ symbol means Ctrl:
| Action | Keys |
|---|---|
| Save | Ctrl+O, then Enter |
| Exit | Ctrl+X |
| Cut line | Ctrl+K |
| Paste | Ctrl+U |
| Search | Ctrl+W |
| Go to line | Ctrl+_ |
micro
A more comfortable terminal editor with familiar keybindings (Ctrl+S to save, Ctrl+Q to quit, Ctrl+C/V for copy/paste). Supports syntax highlighting, mouse interaction, and multiple tabs.
micro my_script.R| Action | Keys |
|---|---|
| Save | Ctrl+S |
| Quit | Ctrl+Q |
| Copy | Ctrl+C |
| Paste | Ctrl+V |
| Cut line | Ctrl+K |
| Undo | Ctrl+Z |
| Find | Ctrl+F |
| Go to line | Ctrl+G |
If you’re used to graphical editors, micro will feel more natural than nano. For anything more involved, consider using Positron or VS Code remotely.
Disk usage
diskus – fast directory size
diskus quickly shows the total size of a directory. It’s a faster alternative to du -sh.
# Check how much space a directory uses
diskus ~/my_project
# 2.34 GB
# Check your home directory size
diskus ~To find what’s taking up space, combine with du for a breakdown:
# Top 10 largest subdirectories
du -h --max-depth=1 ~ | sort -hr | head -10Remember to move inactive projects to /mnt/sas to keep /srv/home lean.
Persistent terminal sessions
When you SSH into the cluster, your session is tied to your connection. If your network drops or you close your laptop, any running interactive session is lost. A terminal multiplexer solves this by running a persistent session on the head node that survives disconnects.
zellij (recommended for beginners)
zellij is a modern terminal multiplexer with an on-screen interface — it shows keybindings at the bottom, so you don’t need to memorize anything.
# Start a new session
zellij
# Or with a name
zellij -s analysis
# Reattach to an existing session
zellij attach analysis
# List sessions
zellij list-sessionsZellij shows a status bar with available actions. Press Ctrl+p to enter pane mode, Ctrl+t for tab mode, etc. — the bar updates to show what you can do.
tmux (classic)
tmux is the traditional choice. More configurable, but requires memorizing keybindings.
This is especially useful for interactive Slurm sessions – you can start a salloc session inside tmux, detach, and come back later.
Basic workflow
# Start a new tmux session (give it a name)
tmux new -s analysis
# Inside tmux, do your work
module load R/4.5.3
salloc --cpus-per-task=4 --mem=8G --time=04:00:00
R
# ... work ...
# Detach from tmux (session keeps running): Ctrl+b, then d
# You can now disconnect from SSH entirely.
# Later, reconnect via SSH and reattach:
tmux attach -t analysisEssential commands
| Action | Keys |
|---|---|
| Detach from session | Ctrl+b, then d |
| New window | Ctrl+b, then c |
| Next window | Ctrl+b, then n |
| Previous window | Ctrl+b, then p |
| Split horizontally | Ctrl+b, then " |
| Split vertically | Ctrl+b, then % |
| Switch pane | Ctrl+b, then arrow key |
# List running sessions
tmux ls
# Attach to a session
tmux attach -t analysis
# Kill a session
tmux kill-session -t analysisAlways name your tmux sessions (tmux new -s name) so you can easily find and reattach to them. Without a name, tmux assigns numbers (0, 1, …) which are easy to mix up.
direnv – per-project environments
direnv is pre-installed and initialized automatically on login (see Shell enhancements above). No setup needed — just create .envrc files in your project directories.
Usage
Create an .envrc file in any project directory:
# ~/my_project/.envrc
module load R/4.5.3The first time you enter the directory, direnv will ask you to approve the file:
cd ~/my_project
# direnv: error .envrc is blocked. Run `direnv allow` to approve its content.
direnv allow
# direnv: loading ~/my_project/.envrc
# direnv: export +PATH ...From now on, R is loaded automatically when you cd into the project and unloaded when you leave.
File transfer
Transferring files between your local machine and the cluster is a common task. We recommend rsync for command-line transfers – it’s efficient, resumable, and handles large datasets well.
rsync basics
rsync synchronizes files between locations. It only transfers what’s changed, making it ideal for updating projects.
Upload to the cluster:
# Copy a directory to your home folder
rsync -avP ~/my_project/ <user>@bipscluster:/srv/home/<user>/my_project/
# Copy specific files
rsync -avP data/*.csv <user>@bipscluster:/srv/home/<user>/project/data/Download from the cluster:
# Download results to your local machine
rsync -avP <user>@bipscluster:/srv/home/<user>/project/results/ ~/Downloads/results/
# Download a single file
rsync -avP <user>@bipscluster:/srv/home/<user>/project/output.csv .Common flags:
| Flag | Purpose |
|---|---|
-a |
Archive mode (preserves permissions, timestamps, symlinks) |
-v |
Verbose output |
-P |
Show progress and allow resuming interrupted transfers |
-z |
Compress during transfer (useful for text files over slow connections) |
--dry-run |
Preview what would be transferred without actually copying |
--exclude |
Skip files matching a pattern (e.g., --exclude='*.tmp') |
In rsync, a trailing slash on the source has meaning:
rsync -av my_project/ remote:my_project/copies the contents ofmy_projectintomy_projectrsync -av my_project remote:my_project/copies the directory itself, creatingmy_project/my_project
When in doubt, use --dry-run first to see what would happen.
Where to put large data
Before transferring large datasets, consider where they should live:
- Active project data →
/srv/home/<user>/(fast NVMe storage) - Large datasets, archives, inactive projects →
/mnt/sas/<user>/(high capacity, slower)
See Storage for details on the different storage tiers.
For very large transfers to /mnt/sas, consider running rsync inside a tmux session so it continues if your connection drops:
tmux new -s transfer
rsync -avP /local/big_dataset/ <user>@bipscluster:/mnt/sas/<user>/big_dataset/
# Ctrl+b, d to detachGUI applications (SFTP clients)
If you prefer a graphical interface for file transfers, these SFTP clients work well:
| Application | Platform | Notes |
|---|---|---|
| FileZilla | Windows, macOS, Linux | Popular, full-featured, supports SFTP |
| WinSCP | Windows | Integrates with PuTTY, includes basic editor |
| Cyberduck | macOS, Windows | Clean interface, integrates with Finder/Explorer |
| Transmit | macOS | Polished, fast (commercial) |
To connect, use these settings:
- Protocol: SFTP (SSH File Transfer Protocol)
- Host:
bipscluster(or the full hostname) - Port: 22
- Username: your cluster username
- Authentication: your SSH key or password
The same storage guidelines apply – use /srv/home/<user> for active work and /mnt/sas/<user> for large or archival data.