Terminal | Jupyter Notebook Tutorial (2026) | Step-by-Step Guide

Terminal | Jupyter Notebook Tutorial (2026) | Step-by-Step Guide

Below is a step-by-step guide on using the Terminal in Jupyter Notebook.

Terminal in Jupyter Notebook provides a command-line environment where you can install Python packages, run Python programs, and execute other Windows commands.

1. Open a Terminal

In the Jupyter Notebook interface:

  • 📌 Click New in the upper-right corner.
  • 📌 Select Terminal.

A new terminal tab will open inside the Jupyter interface.

2. Check the Current Directory

In the terminal, run the following command to show your current working directory:

pwd

Output:

Path ---- C:\Users\schol\OneDrive\Documents

You can also use the following command to see the files and folders in the current directory:

dir

Output:

Directory: C:\Users\YourACName\OneDrive\Documents Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 04/25/2026 09:56 Custom Office Templates d----- 04/25/2026 09:56 Visual Studio 2022

3. Navigate Between Folders

Use cd to change directories.

📌 To move into a folder, run the following command:

cd "Visual Studio 2022"

📌 To move one level back, run:

cd ..

📌 To go to a specific location, use the full path:

cd "C:\Users\schol\OneDrive\Documents\Visual Studio 2022"

4. Create a Folder

📌 You can create a new folder using the following command:

mkdir myproject

📌 Then enter the newly created folder:

cd myproject

5. Create a File

📌 You can create a simple text file from the Windows terminal:

New-Item test.txt

📌 Check that the file exists:

dir

You should see test.txt in the directory listing.

6. Run Python from the Terminal

📌 First, check whether Python is available:

python --version

Output:

Python 3.14.6

📌 You can start the Python interpreter by running:

python

Then try the following Python code:

print("Hello from Jupyter Terminal")

📌 Exit the Python interpreter with:

exit()

7. Install Python Packages

📌 One of the most useful features of the terminal is the ability to install Python packages.

For example:

pip install pandas

Or install multiple packages at once:

pip install numpy matplotlib

📌 If pip does not work, try:

python -m pip install pandas

8. Run a Python Program

📌 Create a file named hello.py using the following command:

New-Item hello.py

📌 Open hello.py in Notepad using:

notepad hello.py

Add the following code to the file:

print("Hello World!")

📌 Save the file and run it from the terminal:

python hello.py

The terminal will display:

Hello World!

9. Other Useful Terminal Commands

📌 You can also use the terminal to check your Jupyter installation:

jupyter --version

📌 You can see the installed Python packages with:

pip list

📌 You can also check which Python executable is being used:

where.exe python

Conclusion

The Terminal in Jupyter Notebook is a useful tool for working with Python projects directly from the Jupyter environment. You can navigate folders, create files and directories, check your Python installation, install packages, run Python programs, and manage your Jupyter environment using familiar terminal commands.

Comments

Popular posts from this blog

How to Install Geany 2.1 on Windows 10/11 (2026) | Step-by-Step Guide

How to Install Anaconda v2025.12-2 on Windows 10/11 (2026) | Step-by-Step Guide

How to Install Miniconda on Windows 10/11 (2026) | Step-by-Step Guide