Change Jupyter Notebook’s working directory

jupyter

Updated August 29, 2026

Start Jupyter with the directory that should appear as its file-browser root:

python -m jupyter lab --notebook-dir=/home/me/projects

The path can be relative to the current terminal directory. On Windows, quote a path containing spaces, for example --notebook-dir="C:\Users\me\projects". jupyter notebook --notebook-dir=... works for the classic interface.

For a permanent setting, use the configuration option supported by your installed Jupyter Server version. Current Jupyter Server uses ServerApp.root_dir; older Notebook releases used NotebookApp.notebook_dir. Generate or edit the configuration only after checking the version's documentation:

jupyter server --generate-config

A launch argument is easier to diagnose and does not change every project. If the browser shows the wrong folder, check the command printed by the running server and whether a desktop launcher or IDE started a different server. Do not expose a notebook server on a public interface without authentication and network controls.

Sources

related.

Ruslan Osipov

Ruslan Osipov

About the author