Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open new named jupyter notebook from terminal

I can open an existing jupyter notebook with a single command (from the docs):

When starting a notebook server from the command line, you can also open a particular notebook directly, bypassing the dashboard, with ipython notebook my_notebook.ipynb. The .ipynb extension is assumed if no extension is given.

However, when I want to open a new notebook it seems as if I have to follow 3 steps:

  1. Run ipython notebook.
  2. Open a new notebook by clicking New > Python 3. create new notebook
  3. Edit the name of the notebook rename notebook

Question

Is there a command that allows me to combine these 3 steps in a single command, similar to the command to open existing notebooks? E.g., something like this pseudo code: ipython notebook --new my_notebook.ipynb.

like image 812
Flo Avatar asked Aug 27 '17 11:08

Flo


People also ask

How do I open a Jupyter Notebook in Mac terminal?

Step 1: Open up your Terminal by holding Command and hitting Space, which should bring up your Spotlight Search. Then, type Terminal and hit Return. Step 2: In your Terminal, type jupyter notebook and hit Return.

How do I add a notebook to my jupyter PATH?

Click on New and add the path you have previously located for the Python scripts. That's it. Restart your command prompt and all your python scripts should run directly on the command prompt anywhere. PS : Also, make sure that your jupyter scripts are there in the Python Scripts folder.


1 Answers

Using this command you can create and open a new notebook without getting into the application. This command will work only in Linux operating system

jupyter notebook $(cat Untitled.ipynb >filename.ipynb && echo filename.ipynb)
like image 174
Adithya S Avatar answered Nov 14 '22 06:11

Adithya S