1、修改默认目录
1打开命令提示符窗口: win+r 输入 cmd
输入指令:jupyter notebook --generate-config  我这里因为已经创建过配置文件了,所以会显示OverWrite(重写)。
根据上述路径在你的磁盘中找到jupyter_notebook_config.py 文件。
在文件中搜索c.NotebookApp.notebook_dir ,找到相应位置修改为你的默认打开路径,记得删去注释符# ,如果添加目录中含有数字记得使用双斜杠\\ 转义,如下图所示。

2.修改默认浏览器
我这里将浏览器修改为firefox
同样在jupyter_notebook_config.py 文件中搜索c.NotebookApp.browser ,在这行代码下面添加如下内容:
import webbrowser
webbrowser.register("firefox", None, webbrowser.GenericBrowser(
u"C:\\Program Files\\Mozilla Firefox\\firefox.exe"))
c.NotebookApp.browser = 'firefox'
如下图所示:  记得将框中目录修改为自己的浏览器安装目录。
保存,退出
|