15

Normally, I launch jupyter from a new bash terminal:

~$ jupyter notebook

and then navigate down the tree to the files I want to work at.

I just did it from a terminal that was already running at a different path:

~/blah/blah/blah$ jupyter notebook

and realized that that directory becomes the home for jupyter. I wanted to work at a file located at, say ~/blah/thingy/luis.ipynb, but couldn't find my way up.

How do I navigate the directory tree upwards in jupyter notebook?

2
  • I don't think this is possible at the moment
    – cel
    Commented Jul 9, 2016 at 16:17
  • @cel Yes, it looks like that. Do you know why? I am just curious about it, it's not a bad issue or something (for me at least)
    – Luis
    Commented Jul 9, 2016 at 17:03

2 Answers 2

12

As explained in https://github.com/ipython/ipython/issues/7751, it is not possible to navigate to the parent directory for security reasons:

The kernel might not be python, nor on the same machine than the server, nor do you need a running kernel to use server API(s).

If you want, you can ask for more information in the aforementioned GitHub issue.

1
0

As edwinksl pointed out it is not possible for security reasons. See https://github.com/jupyter/notebook/issues/2032.

But if you want to keep your luis.ipynb file in its original location and still be able to access it from Jupyter Notebook browser, you can create a symlink to it in your running Jupyter Notebook directory:

ln -s ~/blah/thingy/luis.ipynb ~/blah/blah/blah/

For more details on symlinks see https://www.howtogeek.com/297721/how-to-create-and-use-symbolic-links-aka-symlinks-on-a-mac/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.