The Founder’s Guide:
How to Install the Jupyter Notebook Server on Linux
The condensed tutorial with copy and paste code and screenshots
“The expanded version of this article uses concise explanations to help you learn what’s happening 💡”
Open Terminal:
- Click “Activities” in the top-left corner
- Enter “Terminal” into the search bar
- Click “Terminal”
Install Jupyter Notebook:
- Copy the command from below these instructions
- Paste the command into Terminal
- Press “Enter”
python -m pip install jupyter
Install the WebSocket Extension:
- Copy the command from below these instructions
- Paste the command into Terminal
- Press “Enter”
python -m pip install jupyter_http_over_ws
Restart Bash:
- Copy the command from below these instructions
- Paste the command into Terminal
- Press “Enter”
exec $SHELL
Create the Configuration File:
- Copy the command from below these instructions
- Paste the command into Terminal
- Press “Enter”
jupyter notebook --generate-config
Open the Jupyter Directory:
- Copy the command from below these instructions
- Paste the command into Terminal
- Press “Enter”
cd $HOME/.jupyter
Create the SSL Certificate:
- Copy the command from below these instructions
- Paste the command into Terminal
- Press “Enter”
- Enter “US” into “Country Name”
- Press “Enter”
- Enter “.” into the remaining fields
- Press “Enter”
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout mykey.key -out mycert.pem
Create the JSON File:
- Copy the command from below these instructions
- Paste the command into Terminal
- Press “Enter”
echo "" > $HOME/.jupyter/jupyter_notebook_config.json
Open the JSON File:
- Copy the command from below these instructions
- Paste the command into Terminal
- Press “Enter”
gedit $HOME/.jupyter/jupyter_notebook_config.json
Edit the JSON File:
- Copy the JSON from below these instructions
- Paste the JSON into Text Editor
- Change “User” to the Unix username
- Click the “File” menu
- Click “Save”
Create the Password:
- Copy the command from below these instructions
- Paste the command into Terminal
- Press “Enter”
jupyter notebook password
Install Net Tools:
- Copy the command from below these instructions
- Paste the command into Terminal
- Press “Enter”
sudo apt-get install net-tools
Get the IPv4 Address Netmask:
- Copy the command from below these instructions
- Paste the command into Terminal
- Press “Enter”
- Write down the “IPv4 Address” and “Netmask”
ifconfig
Log into the Router:
- Open the web browser
- Copy the router IP address from below these instructions
- Paste the router IP address into the web browser
- Press “Enter”
- Log into the router
192.168.0.1
Set up Port Forwarding:
- Find the “Port Forwarding” page
- Paste the IPv4 address into the “Enter IP Address” text field
- Copy the port from below these instructions
- Paste the port into the “WAN Starting Port” text field
- Paste the port into the “WAN Ending Port” text field
- Select “All IP Addresses”
- Click “Apply”
8889
Get the Default Route and DNS:
- Copy the command from below these instructions
- Paste the command into Terminal
- Press “Enter”
- Click “Wifi” or “Network”
- Click “⚙”
- Write down the “Default Route” and “DNS”
gnome-control-center
Set the Static IP Address:
- Click the “IPv4” tab
- Select “Manual”
- Enter the “IPv4 Address,” “Netmask,” “Gateway,” and DNS” from earlier
- Click “Apply”
Open Crontab:
- Copy the command from below these instructions
- Paste the command into Terminal
- Press “Enter”
crontab -e
Edit the Crontab File:
- Navigate to the bottom of the file using the “↓” key
- Copy the code from below these instructions
- Press “Shift” + “Control” + “V” to paste the code into Terminal
- Press “Control” + “S” to save the changes
- Press “Control” + “X” to exit Crontab
- Restart the computer
@reboot cd; source /.bashrc; /home/user/.pyenv/shims/jupyter-notebook >> ~/cronrun.log 2>&1
Access the Server From the Local Network:
- Log into a different computer or laptop
- Connect to the same WiFi network
- Enter the IPv4 Address into the web browser
- Prepend “https://” to the IP address
- Append “8889” to the IP address
- Press “Enter”
- Type “thisisunsafe”
- Enter the password
- Click “Log In”
Get the Public IP Address:
- Copy the URL from below these instructions
- Paste the URL into the web browser
- Write down the public IP address
https://www.google.com/search?q=whatsmyip
Access the Server From a Remote Network:
- Log into a different computer or laptop
- Connect to a different WiFi network
- Enter the public IP address into the web browser
- Prepend “https://” to the IP address
- Append “8889” to the IP address
- Press “Enter”
- Type “thisisunsafe”
- Enter the password
- Click “Log In”
“Hopefully, this article helped you get the 👯♀️🏆👯♀️ remember to subscribe to get more content 🏅”
Next Steps:
This article is part of a mini-series that helps readers set up everything they need to start learning about artificial intelligence, machine learning, deep learning, and or data science. It includes articles that contain instructions with copy and paste code and screenshots to help readers get the outcome as soon as possible. It also includes articles that contain instructions with explanations and screenshots to help readers learn about what’s happening.
Linux:
01. Install and Manage Multiple Python Versions
02. Install the NVIDIA CUDA Driver, Toolkit, cuDNN, and TensorRT
03. Install the Jupyter Notebook Server
04. Install Virtual Environments in Jupyter Notebook
05. Install the Python Environment for AI and Machine LearningWSL2:
01. Install Windows Subsystem for Linux 2
02. Install and Manage Multiple Python Versions
03. Install the NVIDIA CUDA Driver, Toolkit, cuDNN, and TensorRT
04. Install the Jupyter Notebook Server
05. Install Virtual Environments in Jupyter Notebook
06. Install the Python Environment for AI and Machine Learning
07. Install Ubuntu Desktop With a Graphical User Interface (Bonus)Windows 10:
01. Install and Manage Multiple Python Versions
02. Install the NVIDIA CUDA Driver, Toolkit, cuDNN, and TensorRT
03. Install the Jupyter Notebook Server
04. Install Virtual Environments in Jupyter Notebook
05. Install the Python Environment for AI and Machine LearningMac:
01. Install and Manage Multiple Python Versions
02. Install the Jupyter Notebook Server
03. Install Virtual Environments in Jupyter Notebook
04. Install the Python Environment for AI and Machine Learning