Jupyter Notebook is an open-source, interactive web application that allows us to create and share documents. These documents can a bash script or can be code or simple text files or visualization files. It was created as a spinoff of the IPython Notebook project. It runs on the IPython kernel only but there are over 100 other kernels that also can be utilized.
Recommended Read: Important PostgreSQL commands that every beginner should know
Also Read: How to install PIP3 on CentOS/RHEL & use it
Jupyter Notebook supports over 40 programming languages. In this tutorial, we will learn to install the Jupyter notebook on Linux systems. So let’s start this tutorial with pre-requisites first.
Pre-Requisites
There are two methods using which we can install jupyter notebook on Linux. We can install it either using ‘CONDA’ or ‘PIP’. So for pre-requisites, we should have either or both of those installed on our system.
Conda Installation
We have published detailed tutorials for the installation of CONDA (ANACONDA) on Ubuntu & CentOS. Please refer to those tutorials to install anaconda on the system.
PIP installation
Refer to the following articles for installing PIP on Ubuntu & CentOS/RHEL. Once we have these installed, we move to the next part i.e. install Jupyter Notebook.
Install Jupyter Notebook
As mentioned above, we can install jupyter notebook using either CONDA or PIP, in both cases installation required only a single command. We will see the installation steps for both now.
Using Conda
The command for installation of jupyter notebook using conda is,
# conda install -c conda-forge jupyterlab
Using PIP
The command for installation of jupyter notebook using conda is,
# pip install jupyterlab
Once the installation is complete, we need to start the jupyter notebook from the terminal with the following command,
# jupyter notebook
You will now be redirected to your browser by default or if you need to access URL manually, then enter the following URL on the web browser
http://127.0.0.1:8888
Mine is running on port 8080, you can also change the port with the command mentioned below. Now once the jupyter notebook webpage opens, you would be asked to enter “Password or Token” & below it you can also find instructions to find the token. The token is required to create a new password first time we log in to the jupyter notebook & you can find it on the startup logs of jupyter notebook as also shown in the previous screenshot. Enter the token & then create a new password. Once this is complete, log in to the jupyter & you should see a screen like this,
Now let’s discuss some extra options that you can use for running the jupyter notebook.
By default, jupyter will only work on the localhost & if we need to access the jupyter notebook from a remote IP address, then we need to start jupyter from the terminal with an extra parameter,
# jupyter notebook – -ip=’*’
Or we can also mention a single IP in place of ‘*’ to connect from that single IP only. The default port number for jupyter notebook is 8888, we can also change that with the following command,
# jupyter notebook – -ip=’*’ – -port=’8080’
If needed, we can also run the jupyter notebook in the background,
# nohup jupyter notebook – -ip=’*’ – -port=’8080’ &
You can now start using the jupyter notebook for your needs & this was it for this tutorial on how to install jupyter notebook on Linux. As always, your comments, questions are most welcomed. Please do send them using the comment box below.