Mac: How to quit Jupyter Notebook from Terminal

When you start Jupyter Notebook from the Mac Terminal, it opens up the notebook on your default web browser.

If you are wondering how to quit Jupyter Notebook gracefully and properly, follow the below steps,

  1. Close or Logout the Jupyter Notebook webpage that's running on the localhost:8888 URL.
  2. Now go to the Terminal Window where you ran the command to run the notebook.
  3. Press the keys Control + C, you will be asked "Shutdown this notebook server (y/[n])?", type y and enter.
  4. You would see some console logs like below and should return back to your zsh prompt.
    ^C [I 00:52:00.605 NotebookApp] interrupted
    Serving notebooks from local directory: /Users/c2ctech
    0 active kernels
    Jupyter Notebook 6.5.4 is running at:
    Shutdown this notebook server (y/[n])? y
    [C 00:52:02.668 NotebookApp] Shutdown confirmed
    [I 00:52:02.670 NotebookApp] Shutting down 0 kernels
    [I 00:52:02.671 NotebookApp] Shutting down 0 terminals
     Code2care@Mac % 
Quit Jupyter Notebook from Terminal Mac

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap