How do you run all cells in Google Colab?

Google Colab · Cell Execution · updated 2026-08-23

Ctrl + Shift + Enter — Run All

Ctrl + Shift + Enter runs every cell in the notebook from top to bottom, the same as Runtime > Run all. Ctrl + Enter runs only the current cell and keeps the cursor in it.

Run all executes top to bottom, which is exactly what a fresh runtime needs: imports and variable definitions land before the cells that use them. After a runtime restart or disconnect, this is the one command that restores the notebook's whole state.

The Runtime menu variants are worth knowing: 'Run before' re-establishes state up to the cell you are on without re-running the slow cells after it, and 'Restart and run all' is the honest reproducibility check - it proves the notebook runs clean from nothing.

Related Google Colab shortcuts: Cell Execution

ShortcutActionNotes
Ctrl + EnterRun CellExecute current cell
Shift + EnterRun & Select NextExecute cell and move to next
Alt + EnterRun & Insert BelowExecute cell and create new cell below
Ctrl + Shift + EnterRun AllExecute all cells

From the Google Colab reference (15 entries) · all how-to answers

Order and state

Run all executes cells top to bottom in a single pass, and stops at the first error, leaving later cells unrun. Because the kernel keeps state between runs, a notebook that works after Run all on a fresh runtime is the test of whether its cells are in the right order — Runtime › Restart session and run all is the clean version, and is what to do before sharing a notebook.

Partial runs

Runtime › Run before and Run after execute everything above or below the selected cell, which is how you rerun a long preprocessing section once and iterate on the model cells below. Ctrl + Enter runs one cell, Shift + Enter runs it and moves on, and Ctrl + F9 is Run all's menu equivalent on some keyboards where the Shift + Enter combination is intercepted.

Interrupting and timeouts

Ctrl + M then I interrupts the running cell; a second interrupt is sometimes needed for a stuck network call. Colab disconnects idle runtimes and enforces a maximum session length, so a Run all that takes hours should checkpoint results to Drive periodically and be resumable from the middle.