Shell & Terminal
The command line is your primary interface to the AIRLab servers. This guide covers the basics of connecting, navigating, and managing your work through the shell.
Connecting via SSH
SSH (Secure Shell) creates an encrypted connection to the server. The server IPs are internal — ask your co-supervisor for them. To avoid typing raw IPs, add them to your system's hosts file as memorable aliases:
# AIRLab servers — replace with actual IPs from your co-supervisor
<WESTWORLD_IP> westworld ww
<ELYSIUM_IP> elysium ely # AIRLab servers — replace with actual IPs from your co-supervisor
<WESTWORLD_IP> westworld ww
<ELYSIUM_IP> elysium ely Note: You cannot directly overwrite this file with Notepad.
Save the edited file anywhere on your desktop, then drag and drop it into
C:\Windows\System32\drivers\etc\ to overwrite it
(administrator permission required).
Then configure your SSH client to handle usernames and key selection automatically. Add the following to your SSH config file (create it if it doesn't exist):
# Westworld
Host ww westworld
HostName westworld
User lastname <-- replace with your actual username on the server
IdentityFile ~/.ssh/id_ed25519_airlab
ServerAliveInterval 60
ServerAliveCountMax 3
# Elysium
Host ely elysium
HostName elysium
User lastname <-- replace with your actual username on the server
IdentityFile ~/.ssh/id_ed25519_airlab
ServerAliveInterval 60
ServerAliveCountMax 3 # Westworld
Host ww westworld
HostName westworld
User lastname <-- replace with your actual username on the server
IdentityFile ~/.ssh/id_ed25519_airlab
ServerAliveInterval 60
ServerAliveCountMax 3
# Elysium
Host ely elysium
HostName elysium
User lastname <-- replace with your actual username on the server
IdentityFile ~/.ssh/id_ed25519_airlab
ServerAliveInterval 60
ServerAliveCountMax 3 With this in place, connecting to any server is just:
ssh ww # westworld
ssh ely # elysium
After editing ~/.ssh/config, host names get tab-autocomplete in your terminal.
You can also open remote folders directly in VS Code with the Remote - SSH
extension using these same aliases.
SSH Keys
Password authentication is convenient but weaker than key-based authentication. Set up an SSH key pair once and never type your password over the network again.
# 1. Generate a key pair (Ed25519 is the modern standard)
# The -C comment is optional but helps identify the key later
ssh-keygen -t ed25519 -C "airlab" -f ~/.ssh/id_ed25519_airlab
# 2. Copy the public key to every server you use
ssh-copy-id -i ~/.ssh/id_ed25519_airlab.pub lastname@<westworld_ip>
ssh-copy-id -i ~/.ssh/id_ed25519_airlab.pub lastname@<elysium_ip>
# 3. Test key login — no password prompt means it worked
ssh ww # 1. Generate a key pair (Ed25519 is the modern standard)
# The -C comment is optional but helps identify the key later
ssh-keygen -t ed25519 -C "airlab" -f C:\Users\YourName\.ssh\id_ed25519_airlab
# 2. Windows does not have ssh-copy-id — use PowerShell instead
type C:\Users\YourName\.ssh\id_ed25519_airlab.pub | ssh lastname@<westworld_ip> "mkdir -p .ssh && cat >> .ssh/authorized_keys"
type C:\Users\YourName\.ssh\id_ed25519_airlab.pub | ssh lastname@<elysium_ip> "mkdir -p .ssh && cat >> .ssh/authorized_keys"
# 3. Test key login — no password prompt means it worked
ssh ww GitHub on the Server
You will want to git clone and git push directly from the
compute servers. The easiest way is to connect remotely with VSCode's Remote - SSH extension and use the built-in Git integration.
More on that in the VS Code Integration section of the Docker guide.
Common Navigation & File Operations
| Command | What it does | Example |
|---|---|---|
pwd | Print current directory | pwd |
ls | List directory contents | ls -lah |
cd | Change directory | cd ~/dataset/private |
mkdir | Create a directory | mkdir -p results/run_01 |
cp | Copy files or directories | cp -r src/ backup/ |
mv | Move or rename | mv old_name.py new_name.py |
rm | Delete files | rm -rf results/old_run/ |
cat | Print file contents | cat config.yaml |
less | Page through a file | less training.log |
grep | Search inside files | grep "val_loss" training.log |
find | Search for files | find . -name "*.pt" |
du | Disk usage | du -sh ~/dataset/private/* |
rm -rf has no undo. On a shared server there is no
trash bin and no backup for your home directory. Double-check the path before
pressing Enter, every single time.
Useful patterns
# Search command history
history | grep docker
# Count lines in a file
wc -l training.log
# Sort and unique a list
cat labels.txt | sort | uniq -c | sort -rn
# Extract a .tar.gz archive into a specific directory
tar -xzf dataset.tar.gz -C ~/storage_megaverse Monitoring Resources
Before starting an experiment, always check that the resources you booked are actually free.
# CPU, RAM, and per-process stats (interactive — press q to quit)
htop
# Full GPU status: memory usage, utilisation, running processes
nvidia-smi
# Find who owns a process by surname
ps aux | grep surname
# Watch GPU utilisation live every 2 seconds
watch -n 2 nvidia-smi Tmux — Persistent Terminal Sessions
Training a neural network can take hours or days. If your SSH connection drops — due to a network hiccup, a laptop going to sleep, or a VPN timeout — any process running directly in your terminal will be killed. tmux solves this by running your shell sessions on the server, completely independent of your connection. Detach, close your laptop, and reattach later to find everything exactly as you left it.
The key concept: Ctrl-b is the prefix — press it before every tmux shortcut, then release it before pressing the next key. A full cheat sheet is available here.
Quick start
# Create a named session (use a meaningful name — your project or experiment)
tmux new -s resnet_training
# Inside the session, start your experiment as normal
run-docker 0 0-8 "python train.py"
# Detach — your experiment keeps running on the server
# Press: Ctrl-b then d
# Later, reattach from any SSH session
tmux attach -t resnet_training Sessions
| Action | Command / Shortcut |
|---|---|
| Create a new named session | tmux new -s name |
| List all sessions | tmux ls |
| Attach to a session | tmux attach -t name |
| Detach from current session | Ctrl-b d |
| Rename current session | Ctrl-b $ |
| Kill a session | tmux kill-session -t name |
tmux kill-session -t name.
Windows & Panes
A session can contain multiple windows (like browser tabs), and each window can be split into panes (side-by-side or stacked terminals).
| Action | Shortcut |
|---|---|
| New window | Ctrl-b c |
| Switch to window by number | Ctrl-b 0–9 |
| Next / previous window | Ctrl-b n / p |
| Rename current window | Ctrl-b , |
| Close current window | Ctrl-b & |
| Split pane vertically (side by side) | Ctrl-b % |
| Split pane horizontally (top/bottom) | Ctrl-b " |
| Move between panes | Ctrl-b ↑↓←→ |
| Zoom pane to full screen | Ctrl-b z |
| Close current pane | Ctrl-b x |
Configuration
tmux is highly customizable. Create a ~/.tmux.conf file to set your
preferred keybindings, status bar, colors, and more. Here's a sample config to get you started:
# Enable mouse support (click to select panes/windows, scroll history)
set -g mouse on
# Start window and pane numbering at 1
set -g base-index 1
set -g pane-base-index 1
# Increase scrollback history
set -g history-limit 50000
# Faster key repetition
set -sg escape-time 0
# Reload config with: Ctrl-b r
bind r source-file ~/.tmux.conf ; display-message "Config reloaded"
# Intuitive pane splitting (opens in current directory)
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# Status bar
set -g status-right '%H:%M %d-%b'
set -g status-style 'bg=#102c53 fg=white' # Reload config without restarting tmux
tmux source-file ~/.tmux.conf
# Or inside a session: Ctrl-b r