Slurm Keyboard Shortcuts

Complete Slurm keyboard shortcuts and commands reference — 17 shortcuts across 3 categories. Quick reference cheat sheet for Windows & Mac.

Slurm is the scheduler on most HPC clusters, and this page lists the commands a user needs to submit, watch and account for jobs: the s-commands. The descriptions are terse because the commands are; the notes explain which one to reach for in each situation and the flags that matter on a GPU cluster.

Job Submission (4)

ShortcutActionDescription
sbatch script.shSubmit batch jobSubmit a job script for later execution. The script contains #SBATCH directives specifying resources like nodes, time, and memory.
srun --pty bashInteractive sessionStart an interactive allocation and open a shell directly on a compute node.
salloc -N1 -c4Allocate resourcesRequest an interactive resource allocation (1 node, 4 cores) without launching a task yet.
sbcast file /tmp/fileBroadcast fileCopy a file from local disk to local storage on every node allocated to a job.

Job Monitoring (5)

ShortcutActionDescription
squeueView job queueList queued and running jobs across the cluster with their state (R=running, PD=pending).
squeue -u $USERView own jobsFilter the queue to show only jobs submitted by the current user.
scancel jobidCancel jobCancel a pending or running job by its job ID.
scancel -u $USERCancel all your jobsCancel every job currently submitted by the current user.
sattach jobid.stepidAttach to jobAttach terminal input, output, and error streams to a currently running job step.

Cluster Info & Accounting (8)

ShortcutActionDescription
sinfoCluster statusShow the state of partitions and nodes managed by Slurm.
sinfo -N -lNode detailList every node individually with CPU count, memory, and state in long format.
scontrol show job jobidJob detailsShow comprehensive configuration and state details for a specific job.
scontrol show node nameNode detailsShow hardware configuration and current state of a specific node.
sacct -j jobidJob accountingReport accounting information (CPU time, memory, exit code) for a completed or running job.
sacct -u $USER --starttime todayToday's jobsList today's jobs for the current user along with resource usage.
sprioJob priorityShow the factors contributing to a pending job's scheduling priority.
sshareFair-share usageShow a user's or account's fair-share usage of the cluster over time.
📜 Source: SchedMD — Slurm documentation (command manual pages). Commands from the Slurm manual pages for the current release. Checked 2026-09-06. How we verify ›
📄 View Printable Cheat Sheet — Download as PDF or print · 🧩 Combine with other tools

Frequently Asked Questions

What are the most useful Slurm keyboard shortcuts?

The most essential Slurm shortcuts are: sbatch script.sh (Submit batch job), srun --pty bash (Interactive session), salloc -N1 -c4 (Allocate resources).

How do I use Slurm commands?

These are command-line commands — type them in your terminal or console. Combine them with shell history search (Ctrl + R) and aliases to work even faster.

What is the Slurm shortcut for submit batch job?

The Slurm shortcut for submit batch job is sbatch script.sh. Submit a job script for later execution. The script contains #SBATCH directives specifying resources like nodes, time, and memory.

Can I combine Slurm shortcuts with other tools?

Yes — use My Stack to combine Slurm shortcuts with any other platform on this site into one printable reference, which is useful if your daily workflow spans several tools.

Related Shortcut Pages

NCCL Tests HPL (Linpack) nvidia-smi (GPU) NVIDIA DGX NVIDIA DCGM torchrun OpenMPI (mpirun) Kubernetes (kubectl)

Search 18,500+ shortcuts across 268 platforms

Explore All Platforms Practice Shortcuts
🔧 Spotted an error or a missing shortcut? Suggest an edit on GitHub — every accepted fix goes live on this page, the API and the CLI.

Getting work onto the cluster

sbatch script.sh submits a batch script whose #SBATCH lines request nodes, GPUs, time and a partition; it returns a job ID immediately and the job runs when resources free up. srun --pty bash asks for an interactive shell on a compute node — for debugging, not for running production work — and salloc -N1 -c4 reserves resources without running anything so several srun steps can share the allocation. sbcast file /tmp/file copies a file to every node of an allocation faster than a shared filesystem when hundreds of nodes need it.

Watching and stopping

squeue shows the whole queue and squeue -u $USER only your jobs, with state (PD pending, R running) and the reason a pending job waits — Priority, Resources, or a limit. scontrol show job jobid prints everything about one job, including the exact nodes and the requested versus allocated GPUs. scancel jobid kills one job, scancel -u $USER kills all of yours, and sattach jobid.stepid connects to the I/O of a running step.

Cluster state and accounting

sinfo shows partitions and node states (idle, alloc, drain, down) and sinfo -N -l lists nodes individually with CPUs, memory and features such as GPU type; scontrol show node name gives one node in full. sacct -j jobid reports what a finished job used — elapsed time, max memory, exit code — and sacct -u $USER --starttime today lists the day's jobs. sprio explains a pending job's priority components and sshare shows fair-share usage, which together answer "why is my job behind theirs".

🤖 Ask AI about Slurm shortcuts

Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"

ChatGPT Claude Perplexity Gemini Grok