Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WSL2 - Ubuntu] System's root directory does not exist... #4328

Closed
KozyWorks opened this issue Jul 22, 2019 · 11 comments
Closed

[WSL2 - Ubuntu] System's root directory does not exist... #4328

KozyWorks opened this issue Jul 22, 2019 · 11 comments

Comments

@KozyWorks
Copy link

KozyWorks commented Jul 22, 2019

  • Your Windows build number: Microsoft Windows [Version 10.0.18941.1001]

  • What you're doing and what's happening: Nothing special... All I did was installing WSL2 and Ubuntu from Microsoft Store.

  • What's wrong / what should be happening instead: As the title says, I can't find System's root directory for Ubuntu.

As per my research the root directory should be located at

C:\Users\USER_NAME\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState

But all I see is temp (File Folder) and ext4 (Hard Disk Image File).

Cap 2019-07-22 12-34-30-550

@Biswa96
Copy link

Biswa96 commented Jul 22, 2019

You can access root directory from 9P server i.e use \\wsl$ network path.

@KozyWorks
Copy link
Author

KozyWorks commented Jul 22, 2019

Hi @Biswa96,

Whoa... I don't get what 9P server and what that network path are D:.....

Sorry, I'm super new to not only WSL, but also Linux environment :/

All I wanted was just checking those Ruby on Rails project files that I've created on WSL2 - Ubuntu.

@KozyWorks
Copy link
Author

KozyWorks commented Jul 22, 2019

Cap 2019-07-22 16-44-10-478

It definitely exists on WSL side of Ubuntu as shown above, but I can't locate it on Windows side :/

I've tested it on both Ubuntu (with no version name attached) as well as Ubuntu-18.04 where both from Windows Store.
(They were both 18.04 LTS version tho...)

@Biswa96
Copy link

Biswa96 commented Jul 22, 2019

  1. Run the distribution 2. Press Win+R 3. Type \\wsl$ which opens File Explorer 4. Double click on the distribution folder.

@KozyWorks
Copy link
Author

  1. Run the distribution 2. Press Win+R 3. Type \\wsl$ which opens File Explorer 4. Double click on the distribution folder.

Wow!!! I got it!

Thank you so much @Biswa96!

I can finally check those files XD

But, I still don't get why that file directory method is not working for me... I don't see anyone else having the same issue as I do :/

@Biswa96
Copy link

Biswa96 commented Jul 22, 2019

Because this is not an issue. This is by-design for WSL2. Users are not supposed to use that AppData\Local\Packages path. That \\wsl$ path is also valid for older WSL1 versions. Read this blog post for more.

@KozyWorks
Copy link
Author

KozyWorks commented Jul 22, 2019

Because this is not an issue. This is by-design for WSL2. Users are not supposed to use that AppData\Local\Packages path. That \\wsl$ path is also valid for older WSL1 versions. Read this blog post for more.

So, you are saying that accessing via that path is more like a cheaty way, not an intended output of the design, right?

If it is, that makes much more sense.

Thank you so much for your clarification, @Biswa96 !!

@craigloewen-msft
Copy link
Member

Please do not access your Linux files using the Appdata folder! This is where your Linux files are (in general) stored on your disk, but accessing them with Windows tools directly from that location could cause issues.

As @Biswa96 commented, please only use the \\wsl$\ method (which we refer to as a 9P server) to access your Linux files from Windows.

@KozyWorks
Copy link
Author

Please do not access your Linux files using the Appdata folder! This is where your Linux files are (in general) stored on your disk, but accessing them with Windows tools directly from that location could cause issues.

As @Biswa96 commented, please only use the \\wsl$\ method (which we refer to as a 9P server) to access your Linux files from Windows.

Roger that!

@Hamed-Elahi
Copy link

Because this is not an issue. This is by-design for WSL2. Users are not supposed to use that AppData\Local\Packages path. That \\wsl$ path is also valid for older WSL1 versions. Read this blog post for more.

This works. Thank you so much.

@legistek
Copy link

This is good stuff thank you. Although I had to use the pure BAT file option on Windows Server as Task Scheduler seemed to refuse to run a VBS no matter what I did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants