I’m new to JupyterLab. I want to change the default location notebooks are saved from ~/ (i.e. my home directory) to a mounted network location with the path /workspaces/Jupyter/ (or alternatively, another local directory I create outside of my home). I do not want all these .ipynb files cluttering up my home directory.
I looked at a number of answers, but as far as I can tell, none of them address my question because they are either specific to Windows or they focus on an older version of Jupyter. Also, because I am new to JupyterLab, I don’t want to screw things up by trying something that I’m not sure is correct. So I’m looking for the correct answer for changing the default working directory in JupyterLab on Linux.
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).
The answer by @krassowski does not work for me on Fedora. It has an effect when starting ‘jupyter notebook’ but not when starting ‘jlab’. Also, first navigating to the ‘desired default directory’ and start ‘jlab’ from there doesn’t work.
This looks to me like a bug.
Anyway, just before sending that I am unable to find a solution, I found the --working-dir flag/option. And fortunately, that solution works