Change default working directory in JupyterLab on Linux

The question on SO that you linked has a “2021 update” from me (path - How to change the Jupyter start-up folder - Stack Overflow), but I will quote it here for convenience:

For recent nbclassic and JupyterLab>=3 use c.ServerApp.root_dir instead of c.NotebookApp.notebook_dir.

For context see migration guide and this question on differences between server and notebook.

So you would run jupyter server --generate-config and should be able to grep-find root_dir (even better, I think it will tell you where the config got generated into).

2 Likes