How to Open Jupyter Notebook from Command Prompt

Jupyter Notebook is a web-based interface for writing and running Python code. You can launch it directly from your command prompt or terminal in just a few seconds. This guide shows you exactly how to do it, plus troubleshooting tips if something doesn’t work

Open your command prompt (Windows) or terminal (Mac/Linux). Type this command and press Enter:

jupyter notebook

That’s it. Your browser will open with Jupyter Notebook running. You can now create and edit notebooks.

Prerequisites: Do You Have Jupyter Installed?

Before you can open Jupyter from the command line, you need to have it installed. Most people install it through pip, which is the Python package manager.

Check if Jupyter is already installed by typing this in your command prompt:

jupyter --version

If a version number appears, you’re ready to go. If you see “command not found” or “is not recognized,” you need to install it first.

Open Jupyter Notebook

How to Install Jupyter Notebook

Installation takes about two minutes.

Using pip (Recommended)

Pip comes with Python. Use this command:

pip install jupyter

Wait for the installation to complete. You should see “Successfully installed” at the end.

See also  How to Remove McAfee Pop Ups From This Computer: (2026 Guide)

Using Anaconda

If you already have Anaconda installed on your computer, Jupyter comes pre-installed. You don’t need to do anything special.

Using conda (Anaconda Users)

If you want to install or update Jupyter through Anaconda:

conda install jupyter

Step-by-Step: Opening Jupyter Notebook from CMD

For Windows Users

  1. Press the Windows key and type “cmd”
  2. Click on “Command Prompt
  3. Type: jupyter notebook
  4. Press Enter
  5. Your default browser opens with Jupyter running

The terminal will show several lines of information, including a local URL that looks like http://localhost:8888. This is normal and means everything is working.

For Mac Users

  1. Open Spotlight (Command + Space)
  2. Type “terminal”
  3. Press Enter to open Terminal
  4. Type: jupyter notebook
  5. Press Enter
  6. Your browser opens with Jupyter ready to use

For Linux Users

  1. Open your terminal (usually Ctrl + Alt + T)
  2. Type: jupyter notebook
  3. Press Enter
  4. Your browser launches Jupyter

Opening Jupyter in a Specific Folder

By default, Jupyter opens in your home directory. If your project files are somewhere else, navigate to that folder first.

Use the cd command to change directories:

cd C:\Users\YourName\Documents\MyProject

On Mac or Linux:

cd ~/Documents/MyProject

Then type:

jupyter notebook

Now Jupyter opens with your project folder as the starting location.

Useful Command Options You Should Know

Start Jupyter on a Specific Port

By default, Jupyter uses port 8888. If you want to run multiple Jupyter instances, use a different port:

jupyter notebook --port 8889

Open a Specific Notebook File

Instead of opening the file browser, you can open a notebook directly:

jupyter notebook myfile.ipynb

Launch Without Opening Your Browser

Sometimes you want Jupyter running without automatically opening a browser window:

jupyter notebook --no-browser

Then copy the URL from the terminal and paste it into your browser manually.

Run Jupyter in Read-Only Mode

This prevents accidental changes to notebooks:

jupyter notebook --read-only

Disable Token Authentication

If you’re running Jupyter only locally and want to skip the token (not recommended for security):

jupyter notebook --ip=localhost --no-browser

What Happens When You Launch Jupyter

When you type jupyter notebook and press Enter, several things happen instantly:

A local server starts running on your computer. This server runs in the background at an address like http://localhost:8888. Your command prompt shows you this information.

Your default web browser automatically opens and connects to this address. The Jupyter interface loads, showing you a file browser.

See also  NFT Membership Passes Explained: Your Complete Guide to Digital Access Tokens in 2026

You can now create new notebooks, open existing ones, or upload files. Everything you do in the browser is processed by the server running in your command prompt.

When you close your browser tab, Jupyter keeps running. To stop it, return to your command prompt and press Ctrl + C, then press Y to confirm. The server shuts down.

Troubleshooting Common Problems

Problem: “jupyter is not recognized”

This means Jupyter is not installed or Python is not in your system PATH.

Solution 1: Install Jupyter using pip.

pip install jupyter

Solution 2: If pip is not recognized, you may need to reinstall Python and make sure to check the “Add Python to PATH” option during installation.

Solution 3: Use the full path to Jupyter:

python -m jupyter notebook

This works even if Jupyter is not in your PATH.

Problem: Browser Won’t Open Automatically

Sometimes Jupyter launches but your browser doesn’t open.

Solution: Copy the URL from your command prompt (it looks like http://localhost:8888/?token=abc123...) and paste it directly into your browser’s address bar.

Problem: “Address already in use”

This happens when another application is using port 8888.

Solution: Use a different port:

jupyter notebook --port 8889

Or close the other Jupyter instance using Ctrl + C in its command prompt.

Problem: Permission Denied Error

This occasionally happens on Mac or Linux.

Solution: Try this command:

python -m jupyter notebook

If that doesn’t work, reinstall Jupyter:

pip install --upgrade jupyter

Problem: Jupyter Runs Slowly or Freezes

Large notebooks can slow things down.

Solution 1: Close other applications using your computer’s memory.

Solution 2: Restart Jupyter by pressing Ctrl + C in your command prompt, then type jupyter notebook again.

Solution 3: If a specific notebook is causing problems, open a new one and transfer your code gradually.

Best Practices for Using Jupyter from CMD

Always Navigate to Your Project Folder First

Before launching Jupyter, use cd to go to the folder containing your project. This keeps your files organized and easy to find.

Use Virtual Environments

Python virtual environments keep your projects isolated from each other. Create one like this:

python -m venv myenv

Activate it (Windows):

myenv\Scripts\activate

Activate it (Mac/Linux):

source myenv/bin/activate

Then install Jupyter in this environment and launch it. This prevents conflicts between project dependencies.

Keep a Terminal Window Open While Working

Leave your command prompt or terminal window open while using Jupyter. This window shows you error messages and helps you understand what’s happening behind the scenes.

See also  How to Create a Distribution List in Outlook

Save Your Notebooks Regularly

Jupyter auto-saves, but don’t rely on it completely. Use Ctrl + S to save manually, especially after important work.

Alternative Ways to Launch Jupyter

From Python

You can also start Jupyter directly from Python:

python

Then in Python:

import subprocess
subprocess.Popen(['jupyter', 'notebook'])

Exit Python with exit().

Using Jupyter Lab (Advanced Alternative)

Jupyter Lab is a newer, more advanced interface. If you have it installed, launch it with:

jupyter lab

It works the same way but offers more features and a modern interface.

Using Anaconda Navigator

If you use Anaconda, click the Navigator application, find Jupyter Notebook in the list, and click “Launch.” This does the same thing as using the command line, but with a graphical interface.

Launching Methods

MethodCommandBest ForDifficulty
Command Prompt/Terminaljupyter notebookDaily use, quick launchesVery Easy
Anaconda NavigatorClick Launch buttonUsers who prefer GUIsEasy
Jupyter Labjupyter labAdvanced workflowsEasy
Python subprocessUse Python codeAutomationMedium
Specific notebookjupyter notebook file.ipynbOpening saved workEasy
No browserjupyter notebook --no-browserRemote serversMedium

Getting Help When Something Goes Wrong

Check Jupyter Documentation

The official Jupyter documentation has detailed guides for every issue.

Verify Your Python Installation

Make sure Python is working properly:

python --version

You should see a version number like “Python 3.9.7” or higher.

Search for Your Specific Error

Take the exact error message from your command prompt and search for it online. Stack Overflow and GitHub issues often have solutions to specific problems.

Summary

Opening Jupyter Notebook from your command prompt is straightforward. Type jupyter notebook and press Enter. Your browser opens with Jupyter running. Before your first launch, make sure you have Jupyter installed using pip install jupyter. Navigate to your project folder using the cd command if you want Jupyter to start in a specific location. If something doesn’t work, check that Python is installed, Jupyter is in your PATH, and that port 8888 isn’t in use. Once you’re comfortable with the basics, explore options like specifying ports, running without a browser, and using virtual environments to enhance your workflow.

Frequently Asked Questions

Why does my browser open to a blank page?

Give it a few seconds to load. If it stays blank, check your command prompt for error messages. The URL might have an invalid token. Try copying the full URL from the command prompt and pasting it in your browser.

Can I run Jupyter on a different computer and access it remotely?

Yes, you can configure Jupyter to accept remote connections, but this requires careful security setup. Check the Jupyter documentation on security and configuration for remote access instructions.

Do I need to reinstall Jupyter after updating Python?

Not necessarily, but it’s good practice to reinstall it after a major Python update. Use pip install --upgrade jupyter to ensure compatibility.

How do I stop Jupyter from running?

Press Ctrl + C in your command prompt or terminal. You’ll be asked to confirm. Press Y and Enter. The Jupyter server stops immediately.

What’s the difference between Jupyter Notebook and Jupyter Lab?

Jupyter Lab is the newer, more advanced interface with a file browser, text editor, and terminal all in one application. Jupyter Notebook is simpler and faster for basic work. Both use the same notebook files and can be launched from the command line the same way.

MK Usmaan