Jupyter Notebook Keyboard Shortcuts

The keys for running cells and switching between edit and command modes. Every item below is clearly marked as a shortcut, command, or syntax reference.

Edit mode vs command mode

Jupyter Notebook is modal. In edit mode, most keys type into the selected cell. Press Esc to enter command mode, where single keys act on cells. Press Enter to resume editing. If A or B types a letter, you are still in edit mode.

This reference follows the classic Notebook interface described in the official Notebook Basics example. Notebook 7 uses JupyterLab-based components: do not assume every classic binding or menu label is unchanged. Check the shortcut list in your installed version before using cell-editing or kernel actions.

Build a small analysis notebook

Select a cell and press Enter to write code. Use Shift + Enter to run it, then Esc to work on the notebook structure. Press B to add a cell below and M to turn it into Markdown; press Enter to write a note explaining the result. Press Esc, then S to save. Single letters are command-mode keys, not Ctrl or Cmd combinations.

Check state before restarting

Restarting a kernel clears its in-memory variables. Re-run dependent cells in order before trusting results. Closing the browser tab does not by itself shut down a running notebook.

Notebook Basics and keyboard navigation · Notebook 7 differences · JupyterLab notebook documentation

Jupyter Notebook Modes and Navigation Keyboard Shortcuts

See all Jupyter Notebook modes and navigation shortcuts

Jupyter Notebook Cell Creation and Types Keyboard Shortcuts

See all Jupyter Notebook cell creation and types shortcuts

Jupyter Notebook Cell Editing and Kernel Keyboard Shortcuts

See all Jupyter Notebook cell editing and kernel shortcuts

Frequently Asked Questions

Why does B type text instead of adding a cell?

The cell is in edit mode. Press Esc to enter command mode before using single-letter cell commands. Enter returns to editing.

Are Notebook and JupyterLab shortcuts interchangeable?

No blanket equivalence is implied. This reference follows the classic Notebook documentation. Notebook 7 uses JupyterLab-based components; check your installed version and customised bindings.

Does closing the tab stop the notebook?

No. A notebook can keep running after its browser tab closes. Use the running-notebooks controls to shut it down when finished.