Jupyter Notebook, a widely-used open-source application, enables the creation and sharing of documents containing live code, equations, visualizations, and descriptive text. Originating from the IPython project, Jupyter Notebook supports over 40 programming languages, including Python, R, Julia, and Scala.
Installing Jupyter Notebook on Ubuntu allows you to perform data visualization, machine learning, statistical modeling, and other forms of data analysis directly from your browser. The process is straightforward, requiring a few terminal commands to get Jupyter up and running.
For those accustomed to Python development, Jupyter Notebook provides an interactive shell, excellent for real-time data analysis, combining the power of Python libraries with a user-friendly interface.
$ sudo apt update && sudo apt upgrade -y
$ sudo apt install python3-pip
$ pip3 install notebook
$ jupyter notebook
This command will start the server and open Jupyter Notebook in your default browser. The terminal will display a URL that you can use to access Jupyter from other devices on your local network.
$ jupyter notebook password
Setting a password prevents unauthorized access. After executing this command, you'll be prompted to enter and confirm a password.
This step allows Jupyter to run as a background service, starting on boot.
$ sudo nano /etc/systemd/system/jupyter.service
[Unit] Description=Jupyter Notebook [Service] Type=simple PIDFile=/run/jupyter.pid ExecStart=/usr/local/bin/jupyter-notebook --config=/home/your-username/.jupyter/jupyter_notebook_config.py User=your-username Group=your-groupname Restart=always RestartSec=10 [Install] WantedBy=multi-user.target
$ sudo systemctl enable jupyter && sudo systemctl start jupyter
$ sudo systemctl status jupyter
If you set a password in a previous step, you'll be prompted to enter it before accessing your notebooks.
Enjoy your Jupyter Notebook experience on Ubuntu!
Comment anonymously. Login not required.