How to run jupyter notebook in the background ? No need to keep one terminal for it

You can put the process into the background by using jupyter notebook --no-browser & disown. You can close the terminal afterwards and the process will still be running.

If you’re using zsh you can also use a shorter version that does the same: jupyter notebook --no-browser &!.

To kill the process you can use pgrep jupyter to find the PID of the process and then kill 1234, replacing 1234 with the PID you just found.

Explanation

The --no-browser flag makes jupyter not open the browser automatically, it also works without this flag.

The & puts it into the background of the currently running shell.

The disown then removes the job from the background of the currently running shell and makes it run independently of the shell so that you may close it.

In the zsh version the &! is a built-in function that does the same as & disown.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)