Skip to content
Tutorials Center
My learning

Topics

Lesson 24 of 39 ยท JupyterLab and Extensions

The JupyterLab Interface

Tour the JupyterLab workspace: launcher, file browser, tabs and split views, command palette, console, terminal, text editor, shortcuts, settings and workspaces.

JupyterLab is the current main interface of the Jupyter project. Where the older classic Notebook showed one notebook per browser tab, JupyterLab is a full workspace: notebooks, terminals, text files, consoles, data viewers and previews live side by side, and you can arrange them like panels in an IDE.

JupyterLab cannot run on this site, so this lesson describes the interface in words, using the real menu names and shortcuts. The runnable cells build small stand-ins, such as a command palette search, that explain how the pieces work.

Starting JupyterLab

Terminal
pip install jupyterlab
jupyter lab                      # opens http://localhost:8888/lab in a browser
jupyter lab --no-browser --port 9000
jupyter lab --notebook-dir=notebooks

The server prints a URL with a one-time token the first time. Open that URL; later you can set a password with jupyter server password. The server serves the folder you launched it from, so start it in your project root and, ideally, from inside your project's environment (see reproducible environments).

The main areas

The window has five regions:

  • Menu bar at the top: File, Edit, View, Run, Kernel, Tabs, Settings, Help.
  • Left sidebar with tabs: File Browser, Running Terminals and Kernels, Table of Contents, Extension Manager, and others you install.
  • Main work area in the middle: tabbed panels you can drag.
  • Right sidebar: Property Inspector (cell metadata, slide type) and the Debugger.
  • Status bar at the bottom: kernel state, cell mode, and indicators such as memory use if an extension adds them.
flowchart TB
  M["Menu bar"]
  M --> L["Left sidebar: files, kernels, contents"]
  M --> W["Main area: notebooks, terminals, editors"]
  M --> R["Right sidebar: inspector, debugger"]
  W --> S["Status bar"]

Every panel in the main area is a tab you can drag to a new position.

Launcher and the file browser

A new tab opens the Launcher: a grid of tiles for each installed kernel (Notebook and Console), plus Terminal, Text File, Markdown File and Python File. The file browser on the left works like a file manager: create folders, rename, duplicate, download, upload, and drag files into the main area. Right-click a .csv to open it in a table viewer, or choose Open With to pick a viewer.

Tabs, split views and layouts

Drag a tab to the edge of the work area and a blue outline previews a split. Useful layouts:

  • Notebook on the left, terminal on the right for running scripts.
  • A notebook and a Python file side by side, while you move functions out of cells.
  • A notebook next to itself: right-click the notebook tab and choose New View for Notebook to keep a plot or a summary visible while you work 200 cells further down.
  • Create New View for Output: right-click a cell's output and choose it to pin that output in its own tab.

Use View, Presentation Mode when you show a notebook to others, and View, Show Left Sidebar to toggle space. Simple Interface mode (View menu) shows one document at a time.

Command palette

Press Ctrl+Shift+C (or Cmd+Shift+C) to open the command palette, a searchable list of every command: "restart kernel", "clear all outputs", "toggle line numbers". You rarely need to remember a menu path. The palette is also where extensions add their commands, so it is the first place to look.

How does it find "rst" in "Restart Kernel"? With fuzzy matching: the typed letters must appear in order. Here is a tiny version.

Python A fuzzy command palette

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The real palette ranks matches with a more careful algorithm and highlights the matching letters, but the idea is the same.

Consoles and terminals

  • Terminal (File, New, Terminal) gives a real shell on the machine where the server runs. Use it for git, pip, and running scripts without leaving the browser.
  • Console (right-click a notebook, choose New Console for Notebook) attaches a scratch prompt to the same kernel as the notebook. Try out an expression there without adding a throwaway cell to the notebook. It shares variables, so it can also reveal hidden state.

Keyboard shortcuts

Notebooks have two modes. Press Esc for command mode (blue bar, keys act on cells) and Enter for edit mode (green bar, you type in the cell).

Mode Key Action
Command A / B insert cell above / below
Command D D delete cell
Command M / Y change to Markdown / code
Command Shift+M merge selected cells
Either Shift+Enter run cell, move to next
Either Ctrl+Enter run cell, stay
Edit Ctrl+Shift+- split cell at the cursor
Edit Tab / Shift+Tab complete / show docs

Shortcuts can be changed in Settings, Settings Editor, Keyboard Shortcuts.

Settings and workspaces

Settings, Settings Editor is a searchable form for theme (light, dark), font size, auto-save interval, line numbers and the behavior of every plugin. Behind it are JSON files you can also edit by hand.

A workspace stores the layout: which tabs are open and where. By default there is one per browser. Name a workspace with the URL (/lab/workspaces/myproject) to return to the same layout later, or clone and reset it from the File menu if the layout gets messy.

Python Save and restore a layout (toy model)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Real workspace files are JSON of the same spirit, though much more detailed. Knowing this helps when you want to share a layout or reset a broken one.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What does the JupyterLab command palette do?

    It is a searchable list of every command, including ones added by extensions.
  2. 2. What is a notebook console attached to?

    A console shares the notebook's kernel and its variables, so you can experiment without adding cells.
  3. 3. Which key switches a notebook from edit mode to command mode?

    Esc enters command mode (blue bar); Enter returns to edit mode (green bar).
  4. 4. What does a workspace store?

    A workspace is the saved layout of the interface.

Summary

  • JupyterLab is a tabbed workspace: file browser, launcher, notebooks, terminals, consoles and editors.
  • Drag tabs to split the view, and open a second view of a notebook or an output.
  • The command palette finds any command; shortcuts depend on command or edit mode.
  • The Settings Editor and workspaces control behavior and layout.

Next: JupyterLab Extensions