(Part 5 of series Blueprint for a Modern Research Computing Environment)
Follow me :
Unlike previous parts, this article serves as a map rather than a build tutorial. It covers directory organization, file management, permissions, installing system software with apt, environment variables, SSH, and the basics of HPC clusters and SLURM job submission — the concepts researchers need once they move beyond their local machine to remote servers.
In previous parts, you built a concrete environment on your local machine. Here, the goal is different: this is a map. As a researcher, you’ll eventually work on remote servers and university HPC (High Performance Computing) clusters. This article provides the foundational knowledge needed to navigate these environments confidently.
By the end, you’ll have:
apt.AI tools (like Claude, Grok, Gemini, or ChatGPT) give the best troubleshooting advice when they have the exact text of the tutorial. To ensure the AI understands what you are trying to build, we will give it the actual file.
1. Download the tutorial file
2. Upload it to your AI
Part5.md into the chat).3. Ask for Help Copy and paste this exact prompt into the chat along with your file:
I have attached the markdown file for the tutorial I am following. Please read it so you understand the specific environment I am trying to build.
I need help with the following:
Step [X]: [paste exact step text from the blog]
Command I ran: [paste exact command]
What happened: [paste full output/error — if the terminal was truly blank, say so explicitly]
Please help me troubleshoot and fix this error. You can use your general knowledge to solve the problem, but your solution MUST align with the architecture and tools taught in the attached file. Do not suggest alternative setups that contradict the tutorial. Once fixed, tell me what to do next in the article.
To go deeper on a step before you run a command:
I have attached the
Part5.mdfile. Look at Step [X] and explain exactly what the command does and why we are doing it before I run it.
Think of this series as the roadmap and your AI assistant as your learning companion.
Create nested directories in one command:
mkdir -p ~/project_1/data/raw
mkdir -p ~/project_1/data/processed
mkdir -p ~/project_1/scripts
mkdir -p ~/project_1/results
The -p flag creates all parent directories that don’t exist yet.
View your structure:
find ~/project_1 -type d
Beyond basic navigation, these tools are essential for file management:
rm file.txtrm -rf foldername/ (⚠️ This is permanent; there is no recycle bin)cat file.txt or less file.txt (press q to exit)du -sh ~/project_1/nano: Simple, opens files directly in the terminal; ideal for quick config edits.vim: More powerful but has a steep learning curve; useful for remote servers.Every file and folder in Linux has permissions controlling read, write, and execute access.
Run ls -l ~/project_1/ to see permissions. Change them with chmod:
chmod +x first_script.pychmod 600 ~/.ssh/id_rsaaptUse apt for system-level software, distinct from Python-level packages managed by conda or pip.
sudo apt updatesudo apt install gitsudo apt install gcc g++ gfortranEnvironment variables are configuration values bash reads at startup.
env or echo $PATHexport MY_DATA="/mnt/d/datasets"~/.bashrc and run source ~/.bashrcSSH lets you control remote machines from your terminal.
ssh-keygen -t ed25519 -C "email@example.com"ssh username@server_addressssh-copy-id username@server_address (enables password-less login)scp or rsync -avz for efficient directory synchronizationHPC clusters connect hundreds of computers to run massive jobs. Unlike local machines, you submit these jobs to a queue managed by a scheduler like SLURM.
A basic SLURM job script (job.sh):
#!/bin/bash
#SBATCH --job-name=my_job
#SBATCH --output=my_job_%j.out
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=4
#SBATCH --mem=8G
#SBATCH --time=02:00:00
conda activate env_project1
python first_script.py
sbatch job.shsqueue -u usernameOn HPC, use the module system to load software: module avail, module load python/3.11, module list.
What You’ve Done:
Further reading:
Next: Part 6 — Git and GitHub for Reproducible Research | Previous: Part 4 — Setting Up VS Code