Help with Working with Files and Directories Section

Hi Everyone,
I’ve been working on this section and doing everything exactly as it’s written. However, my prep-work does not show up in the file explorer. I created it, I know that because it won’t let me create it again. However, on the next step it says it doesn’t exist. I’m so confused.

michael@LAPTOP-B7A1DFRR:~ explorer.exe michael@LAPTOP-B7A1DFRR:~ ls
michael@LAPTOP-B7A1DFRR:~ pwd /home/michael michael@LAPTOP-B7A1DFRR:~ cd /prep-work
-bash: cd: /prep-work: No such file or directory
michael@LAPTOP-B7A1DFRR:~ cd michael@LAPTOP-B7A1DFRR:~ mkdir prep-work
mkdir: cannot create directory ‘prep-work’: File exists
michael@LAPTOP-B7A1DFRR:~ ls -F prep-work/ michael@LAPTOP-B7A1DFRR:~ explorer.exe

I got this when I didn’t include the “/” to when I changed directory, but it’s still not showing up in file explorer.
michael@LAPTOP-B7A1DFRR:~ cd prep-work michael@LAPTOP-B7A1DFRR:~/prep-work

Try navigating to the directory that you think the prep-work folder is in, then type “ls” which is short for list stuff. This will list all files and directories in your present working directory. Also, try ls -a to show hidden files as well.

When I change directories I go to the one on top of my intended target then just type cd(space)target-directory but I make sure it’s there by typing ls.

Thank you JoshuaRios, I still can’t find it in the file explorer, but I know it’s there because I took the steps you suggested and got in the directory.

Try navigating to the directory in the command line, then type explorer.exe(space).(dot)

Could you let us know what Operating System(s) you’re using?

My guess is that you might be using Windows Subsystem for Linux (WSL)?

Yes sir that would be correct.

I believe the problem you’re running in to … is that the Windows Subsystem for Linux stores it’s files in Linux. You’re not expected to use Windows (File Explorer) to access the files that are created in your Linux File System.

You can see this SuperUser post for details. Here is the relevant information:

IMPORTANT : Spelunking through the Windows filesystem to access Linux files has and will continue to be unsupported and STRONGLY recommended against! To understand why, please read this post

That being said, the next question you’re going to be asking is, “Great, how do I access the files then?” In which case, you’ll need to use some of the basic Linux commands for navigating your Linux File System. These are commands like cd, mkdir, ls, ls -a, ll. As well as your commands and tools for editing the files: vim, nano, emacs, etc.

I am having the same issues as ksig286. How are we suppose to view the html files in explorer to complete the tutorials if we can’t open the index files because explorer.exe . takes us to system32 instead of taking us to where we are directing the directory.

More context. I downloaded Ubuntu and WSL as directed. I sudo updated and upgraded as directed. Did a full reboot as directed. The terminal works fine and all codes works properly. Except when I want to view the files i created. Explorer.exe . always takes me to system32. In your examples, it shows the prompter using explorer.exe . and it opens file explorer to the index file. I followed the exact same steps and I still get sent to system 32. This is extremely frustrating.

I am working on a Windows 10 operating system.

Extra contribution:

When i open the directory’s file via vs code. It allows me save the file in the directory. However when i right click the name and click reveal in explorer, an error message pops up saying it does not exist.

If you want to access your files both from windows explorer and the Ubuntu terminal you should know that you can find the windows file systems under /mnt/c . It would be exactly the same if you had 2 different operating systems, Windows and Linux, you would mount your windows drives in /mnt/ when you are
If you open the terminal and cd /mnt/c/ and than ls or dir you can find all your windows files so i would suggest you save all your work there so you can see it both from your terminal and windows explorer.

Or you can go to

and find your linux file systems and search for your work but this is specific only to Linux file systems under Windows 10.