Skip to content

Useful Linux bash commands

Konstantinos Tsilimparis edited this page Feb 24, 2026 · 5 revisions

General

Start interactive bash (srun = interactive, sbatch = batch job)

srun --mem=4G --cpus-per-task=2 --time=71:00:00 --pty bash

Check jobs in queue

squeue --me

Check cores, mem, time left of your job

squeue -j <job_id> -o " %.4C %.10m %L"

Cancel job

scancel <job_id>

Hostname of node running Jupyter

import socket socket.gethostname()

Login Node

Watch live RAM

watch -n 1 "cat /sys/fs/cgroup/user.slice/user-$(id -u).slice/memory.current"

Check max memory

cat /sys/fs/cgroup/user.slice/user-$(id -u).slice/memory.max

Last 50 errors (e.g., Pylance/Jupyter crashes)

dmesg | tail -50

Stijn's jupyter guide

Submit Jupyter job

sbatch jupyter_ptk-dev.sh

Watch Jupyter job output (Replace job id)

watch -n 1 cat jupyter-<job_id>.out

Clone this wiki locally