Skip to content

Jupyter Notebook — Introduction

Jupyter Notebook is an open-source, browser-based interactive computing environment that lets you create documents combining live code, equations, visualizations, and narrative text. The name comes from the three core languages it originally supported: Julia, Python, and R.

It is the standard tool for:

  • Data exploration and analysis
  • Machine learning experimentation
  • Scientific computing
  • Teaching and documentation
  • Reproducible research

A notebook is a .ipynb file (JSON format) containing a sequence of cells. The Jupyter server runs a kernel — a separate process that executes code. The browser communicates with the kernel via WebSockets.

Browser (UI) ←→ Jupyter Server ←→ Kernel (Python/R/Julia process)
TypePurpose
CodeExecutable code (Python, R, etc.)
MarkdownFormatted text, headings, lists, math
RawUnformatted text, not executed
Terminal window
# Via pip
pip install notebook # Classic Jupyter Notebook
pip install jupyterlab # JupyterLab (modern UI)
# Via conda
conda install -c conda-forge notebook
conda install -c conda-forge jupyterlab
# Launch
jupyter notebook # opens at http://localhost:8888
jupyter lab # opens JupyterLab
FeatureClassic NotebookJupyterLab
UISingle documentFull IDE-like
Multiple tabsNoYes
File browserBasicFull
ExtensionsLimitedRich ecosystem
TerminalNoYes
RecommendedLegacyYes (current standard)
  • Kernel: The computational engine. Each notebook connects to one kernel. You can restart, interrupt, or change the kernel.
  • Cell execution order: Cells can be run in any order — the kernel maintains state. This is a common source of bugs.
  • Output: Displayed inline below each cell — text, tables, plots, HTML, widgets.
  • .ipynb format: JSON file storing cell content, outputs, and metadata.
# Cell 1 — imports
import numpy as np
import matplotlib.pyplot as plt
# Cell 2 — computation
x = np.linspace(0, 2 * np.pi, 100)
y = np.sin(x)
# Cell 3 — visualization
plt.plot(x, y)
plt.title("Sine Wave")
plt.xlabel("x")
plt.ylabel("sin(x)")
plt.show()
ShortcutAction
Shift+EnterRun cell, move to next
Ctrl+EnterRun cell, stay
Alt+EnterRun cell, insert below
EscCommand mode
EnterEdit mode
A (command)Insert cell above
B (command)Insert cell below
DD (command)Delete cell
M (command)Change to Markdown
Y (command)Change to Code
00 (command)Restart kernel