How to navigate to the root directory in linux

hi all
jlab noob here running Version 4.0.9

I can’t seem to navigate to the root directory in my jlab. I can only “See”

/home/dave/Desktop/tont_24/data/
in the file navigator
how do I get to /home ?

thanks

Perhaps this great answer to ‘How to set default folder in JupyterLab file browser?’ will help you.
Maybe it is sufficient in your case? I think you’d try appending ?file-browser-path=/home to the URL in your browser in your case and entering that. (Or ?file-browser-path=%2Fhome? Yet, I don’t think that is necessary to escape here.)
However, I think it has limits though. I think because it is relative, you cannot get above the starting point using this, it seems.
For example, I was trying to get the file browser above home in a session just now and couldn’t when I can use %cd in a notebook to get there to / as the working directory for the active notebook just fine and that was two levels above where I started and my attempts to use file-browser-path to get above there failed.

1 Like

happy new year to all.
thank you so much for taking the time to reply and giving me things to look at. Remember I am a NOOB and LOVE the jupyter lab experience ( ux, community, zmq ) BUT this seems to be complex. I haven’t tried any of the approaches yet so bear with me. My environment is simple. I run linux mint and ( right now python/julia moving to mojo) and house jupyter labs in a python 3.10 venv.
I was hoping that the UX would allow me to navigate my whole linux filesystem so I am confused as to why I can’t? If you answered that then I apologize. I don’t use conda and don’t plan to.

Okay. Different idea…

I’m trying to understand if you know that is where it is in your machine’s hierarchy or is that what the file navigator displays in JupyterLab?
If it is what it displays in Jupyter, try clicking or double clicking on the other words and symbols in the upper right of the file navigator and see if you can go up?

1 Like

sorry if the question is unclear. I will try to clarify.

using linux my filesystem is bog standard no modifications. SO, in most packages I use I can navigate using the UX to anywhere in the filesystem easily just by clicking the tree structure.

So my expectation would be that I would be able to navigate to /home from jupyter using the file browser but I cannot. Addressing your question, I tried to navigate to /home by clicking on the folder symbol in the file navigator, trying to go “up” using “cd …” no luck. tried to “see” tont_24 top down no luck despite the fact I am actually IN tont_24 ( see pwd) I am confused.

As far as jupyter is concerned my whole file system has a “home” at /home/dave/Desktop/tont_24/data

As I tried to say in my first reply to you, going higher than Jupyter starts in the file navigator seems to be a problem. You’d need to start Jupyter in /home.
The links in my first post will tell you how to potentially change things to do that. You’d know better since it is your machine and you set up Jupyter on it.



As for the notebook in the screenshot…
I specifically mention in my first reply using %cd. Note the symbol there is the percent sign that means the magic symbol and not the exclamation point you seem to use in your notebook. They are very different.

I explain it more here. It boils down to:

In short, you want to use the magic cd command, documented here, in cells when working in Jupyter.

So what you say (quoted below) is not accurate because you weren’t trying correctly:

1 Like

And your screenshot and latest text answer this. Thanks.
As you say, for the sake of the file browser panel, you system thinks the starting point is at /home/dave/Desktop/tont_24/data. You cannot click on anything there to go up because it only shows there and below.

Sorry about the misread of what you, so kindly, explained in your first post. I am new to notebooks as I used to use pluto over in the julia world so I “think” I was mixing the two worlds with the “!”. I didn’t know about the “%” symbol.

I don’t want to make mods to the jupyter environment config as I like to just run things out of the box unless it’s absolutely necessary. So I’ll figure a way around this using a better project structure.

you have given me a LOT to guide me and I thank you as always. Have an excellent new year and here’s to an exciting 2024 should be FUN!!! given mojo

1 Like