How to Install Jupyter Notebook on Rocky Linux 1

How to Install Jupyter Notebook on Rocky Linux 9

Looking to install Jupyter Notebook on Rocky Linux 9?

If you’re new to Rocky Linux 9 or any Linux distributions, you might find it difficult to follow the installation steps.

Worry not.

In this guide, I’ll help you install Jupyter Notebook step-by-step. 

What You’ll Need?

  1. Ensure that Rocky Linux 9 is properly installed and configured on your system (guide)
  2. Have access to the terminal/command line interface
  3. A stable internet connection

If you have the above prerequisites, you can proceed with the below steps for a seamless installation of Jupyter Notebook on Rocky Linux 9.

How to Install Jupyter Notebook on Rocky Linux 9: Step-by-Step Guide 

Step 1: Update and Upgrade Packages

It is considered a good practice to update and upgrade the packages to keep them up-to-date with the latest security patches, bug fixes, and features. 

Here are steps on how to update and upgrade packages on Rocky Linux 9:

  1. Open the terminal and enter the below command before installing Jupyter Notebook to ensure compatibility with packages:
sudo dnf update && upgrade
Update and Upgrade

During the process, if you’re asked to choose Y/N, enter Y to provide additional storage and to continue the process.

Step 2: Install Python-pip3 Package

If you notice the screenshot in Step 1, you might have noticed that the python-pip3 package was installed prior. 

If it is the same case with you, then you can safely skip this step. However, if you do not see the python-pip3 package installed, proceed with the steps below to install: 

  1. On the terminal, enter the below command to install the Python Pip3 utility, which is the official package installer for Python 3:
sudo dnf install python3-pip
Install Python

After you enter the command, ensure you provide the correct password, or else the installation terminates. 

Once again, if you’re asked to choose Y/N, enter Y.

Step 3: Install Jupyter Notebook

With python-pip3 installed, you can now proceed with installing Jupyter Notebook. 

Note: Check by entering the command pip3 –version and see if the output returns a version. If so, you can safely proceed with the steps below. However, if you don’t see the version output, you must repeat Step 2.

  1. On the terminal, enter the below command to install the Jupyter Notebook package:
How to Install Jupyter Notebook on Rocky Linux 9

Step 4: Configure Jupyter Notebook

Follow the below steps to configure your newly installed Jupyter Notebook:

  1. Start by creating a configuration file using the below command, and don’t wait for the output, as it doesn’t generate one:
jupyter notebook --generate-config
  1. After the configuration file is generated, the first thing to set is a password for security using the below command:
jupyter notebook password
Jupyter password

While setting the password, ensure you enter the same password as the Enter password for Verify password

If you have got it wrong, don’t worry; enter the command again to set the password.

Step 5: Run Jupyter Notebook

If you have all the above steps, you’re ready to use Jupyter Notebook. 

While it can be accessed from the local host and port 8888, it is better to access it through the command.

  1. After setting a password, even though it isn’t mandatory, it is a good practice to restart the PC for the changes to appear.
  2. Once done, start by entering the below command on the terminal to open Jupyter Notebook on the browser:
jupyter notebook
Jupyter Notebook running
  1. After the command runs, Jupyter Notebook is loaded on the browser. Now, enter the password you have set in Step 4 to log in and access the Jupyter dashboard.
Jupyter login
  1. If you have entered the right credentials, you are displayed with the Dashboard.
Jupyter Notebook
  1. From the Dashboard, you can start working by pressing on New and selecting the file of your choice. For demonstration, we have created a text file.
Jupyter Notebook new file

Also Check Out: How to Install Hiri Email Client on Ubuntu 22.04 LTS


While this approach is the easiest, you can also install Jupyter Notebook through the Anaconda installer. However, we suggest you proceed with this approach as it doesn’t require the installation of multiple software.

If you have any issues with the above steps, ensure you’re entering the command right, as many accidentally type apt instead of dnf as a habit, forgetting they are on Rocky Linux 9.

Related Posts