⌥+⌃AltPlusCtrl

How to Run a Cell in Jupyter Notebook (Shift+Enter)

Windows: Shift+Enter
Mac: Shift+Return
Linux: Shift+Enter
Shift+Enter (Shift+Return on Mac) executes the currently selected cell's code and moves selection forward to the next cell, creating a brand-new empty cell automatically if you're currently on the notebook's last cell — the default, most frequently used way to work through a notebook from top to bottom. **What actually happens on execution**: for a code cell, Jupyter sends the cell's content to the running kernel (the underlying Python or other language process), which executes it and returns any output — printed text, a returned value, a rendered chart — displayed directly beneath the cell. For a Markdown cell, Shift+Enter instead renders the cell's formatted text (headings, links, styled text) in place of the raw Markdown source, the same execution shortcut serving a genuinely different purpose depending on the cell's current type. **Why it advances to the next cell**: this forward-advancing behavior is specifically what makes Shift+Enter the natural default for working through a notebook sequentially — write a cell, Shift+Enter to run it and move on, write the next cell, repeat, without needing to manually click into the next cell each time or use a separate keyboard shortcut just to move down. **The three run shortcuts compared directly**: Shift+Enter advances forward (creating a new cell only if none already exists below); Alt+Enter always inserts and selects a fresh new cell below regardless of what currently follows; Ctrl+Enter keeps the same cell selected without advancing at all. All three execute identically — the only difference across all three is exclusively about what happens to your selection afterward, covered in more depth on the cell-execution category page. **Execution order and the bracketed number**: after running, a code cell shows a bracketed number (like [3]) indicating the order it was executed in relative to other cells run during the current kernel session — this number is a genuinely useful diagnostic for spotting out-of-order execution, where a notebook's cells were run in a different sequence than they're visually arranged top to bottom, a common hidden source of bugs that only a full Restart & Run All (mentioned in this page's FAQ) reliably catches. **What happens if the cell has an error**: Shift+Enter still runs the cell and displays whatever error traceback the kernel returns, but execution then stops at that point — it does not automatically advance past a failing cell into subsequent cells the way it would after a successful run, since Jupyter has no way to know whether continuing past a genuine error would produce meaningful or misleading results. **A long-running cell**: if a cell's code takes a genuinely long time to execute (a large data processing step, a slow network request), Shift+Enter still returns control of the keyboard immediately in terms of accepting further input, but the cell itself shows an asterisk `[*]` in its execution-count bracket while still running, and any Command-mode shortcuts you trigger on a different cell in the meantime work normally in parallel — the notebook interface itself doesn't lock up while a specific cell is still executing, though of course you can't get that specific cell's actual output until its execution genuinely finishes. **Related shortcuts**: I, I (Interrupt) covered on the cell-execution category page is the shortcut to reach for if a cell run via Shift+Enter is taking far longer than expected or appears genuinely stuck, stopping that specific execution without losing previously defined variables from earlier successful cells.

Related shortcuts