Google Colab Keyboard Shortcuts: Faster Data Science Workflow (2026)

By Jay, editor

Published: May 1, 2026 · 8 min read

Google Colab is the go-to environment for data science, machine learning experiments, and collaborative Python notebooks. Whether you use it for quick experiments or full ML training runs, these shortcuts will significantly speed up your workflow.

Table of Contents

  1. Running cells
  2. Cell editing
  3. Navigation
  4. Runtime management
  5. Command mode vs edit mode
  6. Workflow tips

1. Running cells

Windows / LinuxMacWhat it does
Shift + EnterShift + EnterRun cell and move to next
Ctrl + EnterCmd + EnterRun cell and stay
Alt + EnterOption + EnterRun cell and insert new cell below
Ctrl + F9Cmd + F9Run all cells
Ctrl + F10Cmd + F10Run current cell and all below
Ctrl + F8Cmd + F8Run all cells above current
Ctrl + M ICmd + M IInterrupt execution (stop running cell)
Shift+Enter is your primary shortcut. Work through a notebook top to bottom with Shift+Enter — it runs the cell and drops you into the next one automatically. Much faster than clicking Run for every cell.

2. Cell editing

Windows / LinuxMacWhat it does
Ctrl + M ACmd + M AInsert cell above
Ctrl + M BCmd + M BInsert cell below
Ctrl + M DCmd + M DDelete current cell
Ctrl + M MCmd + M MConvert to text (Markdown) cell
Ctrl + M YCmd + M YConvert to Code cell
Ctrl + M ZCmd + M ZUndo last cell action
Ctrl + M KCmd + M KMove cell up
Ctrl + M JCmd + M JMove cell down
Windows / LinuxMacWhat it does
Ctrl + M PCmd + M PMove to previous cell
Ctrl + M NCmd + M NMove to next cell
EscapeEscapeUnfocus the current cell

4. Runtime management

Windows / LinuxMacWhat it does
Ctrl + M ICmd + M IInterrupt (stop current execution)
Ctrl + M .Cmd + M .Restart session
Ctrl + SCmd + SSave notebook to Drive
Restart session and run all has no default shortcut: pick it from the command palette (Ctrl+Shift+P) or give it a key under Tools › Keyboard shortcuts. It is the cleanest way to verify your notebook runs end-to-end without hidden state. Run this before sharing any notebook.

5. Command mode vs edit mode

Jupyter has two modes: in command mode single letters such as A, B, M and Y act on cells, and in edit mode you type code. Colab's default key bindings have no single-letter cell commands: the same actions sit behind the Ctrl + M prefix (Ctrl + M then A, B, M or Y), and Escape is listed as unfocusing the current cell.

6. Practical workflow tips

The top-to-bottom execution habit

Always use Shift+Enter (not Ctrl+Enter) when working through a notebook sequentially. It keeps you moving forward and avoids the common mistake of forgetting which cell you last ran.

Quick cell type switching

Press Ctrl+M then M to convert the cell to a text (Markdown) cell, or Ctrl+M then Y to convert it back to code.

Verify with restart

Before sharing a notebook, run Restart session and run all (no default key; it is in the command palette, Ctrl+Shift+P). This catches any hidden state dependencies that might cause the notebook to fail when someone else runs it.

Interactive shortcut reference

View All Colab Shortcuts

Why Colab keys look odd

Colab runs in a browser tab and puts most cell operations behind a Ctrl + M prefix: press it, release, then the letter. That is the one idea to internalise; after it, the sequences in the table (Ctrl + M then A, B, D, M, Y) read naturally. The run keys — Ctrl + Enter, Shift + Enter, Alt + Enter — are not prefixed, and they are the same keys Jupyter uses.

A workflow that uses the keys

Write a cell, Shift + Enter to run and move on; when a cell needs another try, Ctrl + Enter to rerun in place; Ctrl + M then B to open a cell below for a quick check; Ctrl + M then D to remove it when done. Running Restart session and run all before sharing shows whether the notebook runs top to bottom. Interrupt with Ctrl + M then I when a cell hangs on a network call, and keep an eye on the runtime timeout for long training runs by saving checkpoints to Drive.

Customising

Tools › Keyboard shortcuts lets you rebind most commands: click the key combination and type the new keys. A few, such as Shift + Tab and Ctrl + /, cannot be overridden. The Colab page on this site carries the current defaults with FAQs, checked against the in-app list.