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 Cell Creation and Types Keyboard Shortcuts
See all Jupyter Notebook cell creation and types shortcuts- Insert Cell Above
In command mode, creates a cell above the selection.
ShortcutA - Insert Cell Below
In command mode, creates a cell below the selection.
ShortcutB - Change Cell to Code
In command mode, changes the selected cell to a code cell.
ShortcutY - Change Cell to Markdown
In command mode, changes the selected cell to a Markdown cell.
ShortcutM - Change Cell to Heading
In command mode, applies a heading level from 1 to 6.
Shortcut1-6
Jupyter Notebook Cell Editing and Kernel Keyboard Shortcuts
See all Jupyter Notebook cell editing and kernel shortcuts- Cut Cell
In command mode, cuts the selected cell.
ShortcutX - Copy Cell
In command mode, copies the selected cell.
ShortcutC - Paste Cell
In command mode, pastes a copied or cut cell.
ShortcutV - Undo Cell Operation
In command mode, undoes a cell operation listed under cell editing.
ShortcutZ - Restart Kernel
In command mode, restarts the kernel when 0 is pressed twice.
Shortcut0→0
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.
