0

I have microsoft 10. I just downloaded the ubuntu app from the microsoft store. I just created a directory called prep-work in ubuntu's shell. I then went to visual code and made notes about a program that is linked to the ubuntu shell (or prep-work directory). However, when I go to the search directory and go into the file explorer I cannot find the ubuntu file at all. I know the file exists because when I try to make the prep-work file again in Ubuntu's shell, it says it cannot do so because the file already exists. How can I locate this file?

also, what is the command I can use to make sure that I am in the prep-work directory? when i type the command pwd i cannot tell if I am in there or so. I am confused.

Please help. Thank you

westna
  • 25

1 Answers1

2

It looks like you installed Ubuntu as a WSL (Windows Subsystem for Linux) version 2 instance. The Ubuntu filesystem of such an instance is stored in a virtual disk which is visible in Windows as a single container file %LOCALAPPDATA%\Packages\%Distribution%\LocalState\ext4.vhdx (where %Distribution% is the internal Microsoft package name of the Ubuntu Release you chose.)

The individual Linux files are therefore not directly visible from Windows. You can access them through the special network node \\WSL$ provided for that purpose. For example, to access my home directory in the Ubuntu 20.04 WSL2 instance I have on my Windows 10 notebook I navigate to \\wsl$\Ubuntu-20.04\home\tilman in Windows Explorer.

Tilman
  • 3,599
  • 21
  • 27
  • hey man i appreciate the help i really do. I am a newbie so I am trying to really learn this stuff. So i went to the search bar for the computer and typed in \wsl$ and i opened it and it says ubuntu file/directory. I clicked it and went to home and went to username and i found the folder. So this is how i view the folder I made notes in visual code and i believe that i linked it into the prep-work folder. I cannot find it but i will keep looking. How do i check in the ubuntu shell for the subdirectories of the prep-work folder? How do I access the prep-work folder in the ubuntu shell? THANKS – westna Feb 28 '21 at 15:30
  • These are very broad and general questions that go somewhat outside the scope of a Q&A site. May I suggest that you start by following a basic shell tutorial to learn the use of commands like lsand cd. Once you've mastered that you're free to come back with more specific questions. – Tilman Mar 02 '21 at 23:02