This tutorial guides you on how to change the Jupyter Notebook startup folder in Windows 10 & Mac. When you launch Jupyter Notebook you will see a new browser window showing a Notebook Dashboard where you can access only files within the start-up folder including any sub folder. Let’s see how to change Jupyter Notebook startup folder in Windows.
Change the Jupyter Notebook startup folder in Windows 10
There are couple of ways using which you can change the startup folder.
To change jupyter notebook startup folder in Windows using shortcut properties follow the below steps.
1: First, type “jupyter” in the Windows search, then do Right Click -> Open File Location.
2: It would open the file explorer where jupyter.exe exists. You will list of jupyter scripts inside the following folder
3: After that you need to create a shortcut for jupyter-notebook.exe by doing Right Click -> Create shortcut. Then you could see a shortcut file created called “jupyter-notebook – Shortcut” as shown in the picture below.
4: Then copy that shortcut to the desktop, do Right Click -> Properties -> Shortcut Tab and change the value for “Start in” to the start-up folder that you would like to change. I have changed the startup folder as C:\Users\91990\Documents\sneppets\Workspaces\Python\Examples as shown below.
5: And click Apply -> Ok to save the settings.
6: Finally, Double Click the jupyter-notebook – Shortcut in the desktop window, it will open up the command prompt and run jupyter notebook server with the modified startup folder. You should be able to see the message ” Serving notebooks from local directory: C:\Users\91990\Documents\sneppets\Workspaces\Python\Examples” as shown below. Therefore the startup-folder is changed.
jupyter-notebook - Shortcut [I 07:57:37.724 NotebookApp] The port 8888 is already in use, trying another port. [W 07:57:37.750 NotebookApp] Terminals not available (error was No module named 'winpty.cywinpty') [I 07:57:37.751 NotebookApp] Serving notebooks from local directory: C:\Users990\Documents\sneppets\Workspaces\Python\Examples [I 07:57:37.751 NotebookApp] Jupyter Notebook 6.3.0 is running at: [I 07:57:37.751 NotebookApp] http://localhost:8889/?token=74c386dc06cbf1f0ac5285076c5b35903efd09318359e90e [I 07:57:37.752 NotebookApp] or http://127.0.0.1:8889/?token=74c386dc06cbf1f0ac5285076c5b35903efd09318359e90e [I 07:57:37.752 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 07:57:37.797 NotebookApp] To access the notebook, open this file in a browser: file:///C:/Users/91990/AppData/Roaming/jupyter/runtime/nbserver-13396-open.html Or copy and paste one of these URLs: http://localhost:8889/?token=74c386dc06cbf1f0ac5285076c5b35903efd09318359e90e or http://127.0.0.1:8889/?token=74c386dc06cbf1f0ac5285076c5b35903efd09318359e90e
Also, you would see notebook interface will appear in new browser (default) window or tab and you could access files from your local directory (start-up folder).
Change the Jupyter Notebook startup folder Windows/ Mac OS
There is another way using which you can change the startup folder of Jupyter Notebook i.e., cd command. Let’s see how to do that.
1: Open a new command prompt in Windows or click on spotlight and type terminal to open terminal window in Mac OS
2: Go to the startup folder using cd command.
> cd C:\Users990\Documents\sneppets\Workspaces\Python\Examples
3: Finally type python -m notebook command from the terminal to launch the Jupyter Notebook interface in a new browser window or tab with the preferred startup folder.
C:\Users990\Documents\sneppets\Workspaces\Python\Examples> python -m notebook [I 12:10:56.381 NotebookApp] Writing notebook server cookie secret to C:\Users990\AppData\Roaming\jupyter\runtime\notebook_cookie_secret [W 12:10:57.016 NotebookApp] Terminals not available (error was No module named 'winpty.cywinpty') [I 12:10:57.016 NotebookApp] Serving notebooks from local directory: C:\Users990\Documents\sneppets\Workspaces\Python\Examples [I 12:10:57.017 NotebookApp] Jupyter Notebook 6.3.0 is running at: [I 12:10:57.017 NotebookApp] http://localhost:8888/?token=2ad96578b2fddf1825107039bae731e076d7d8620967bfc3 [I 12:10:57.017 NotebookApp] or http://127.0.0.1:8888/?token=2ad96578b2fddf1825107039bae731e076d7d8620967bfc3 [I 12:10:57.017 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 12:10:57.070 NotebookApp] To access the notebook, open this file in a browser: file:///C:/Users/91990/AppData/Roaming/jupyter/runtime/nbserver-13252-open.html Or copy and paste one of these URLs: http://localhost:8888/?token=2ad96578b2fddf1825107039bae731e076d7d8620967bfc3 or http://127.0.0.1:8888/?token=2ad96578b2fddf1825107039bae731e076d7d8620967bfc3
That’s it. You had learnt how to change the Jupyter Notebook startup folder both in Windows and Mac OS.
Hope it helped 🙂
You’ll also like:
- To run Jupyter Notebook on Windows from command line
- Run a Jupyter Notebook .ipynb file from terminal or cmd prompt
- Change the default theme in Jupyter Notebook ?
- Amazon Linux AMI : apt-get command not found
- Linux: sudo: apt-get: command not found
- How to Start Stop Restart MariaDB on Linux OS ?
- Putty Fatal Error No supported authentication methods available
- How to find which users belongs to a specific group in linux
- Give write permissions for specific user or group for specific folder in linux
- How to unzip a zip file from Terminal (Google Cloud Shell)
- Build a Docker Image with a Dockerfile and Cloud Build in GCP?
- How to create GCP project on Google Cloud Platform
- MariaDB – How to set max_connections permanently ?
- How to add python3 kernel to jupyter IPython notebook ?
- Is it possible to change Google Cloud Platform Project ID ?
- Create non-root SSH user account and provide access to specific folders
- MySQL : How to grant all privileges to the user on database ?
- How to install OpenJDK 11 in Ubuntu Machine ?