Windows 上 Ubuntu 上 Bash 的 Windows 中的 Lxss 文件夹丢失

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/39886862/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 19:41:23  来源:igfitidea点击:

The Lxss folder in windows for Bash on Ubuntu on Windows is missing

windows

提问by Ryan Schaefer

Problem and Hypothesis

问题与假设

It's a pretty simple problem, I just can't find the Lxss folder in LocalAppData which is suppose to store files from the Bash on Ubuntu on Windows.

这是一个非常简单的问题,我只是在 LocalAppData 中找不到 Lxss 文件夹,该文件夹假设在 Windows 上的 Ubuntu 上存储来自 Bash 的文件。

I only see one of two possibilities for why this is. Either Windows moved the Lxss folder in an update for Bash on Ubuntu on Windows, or it is an error specific to my system that has caused Windows not to create the Lxss folder. I don't think this is the possibility though because it is a fresh install of windows.

我只看到了为什么会这样的两种可能性之一。Windows 在 Windows 上的 Ubuntu 上的 Bash 更新中移动了 Lxss 文件夹,或者是我的系统特定的错误导致 Windows 不创建 Lxss 文件夹。我不认为这是可能的,因为它是全新安装的 Windows。



Steps I have tried:

我尝试过的步骤:

  1. Unhiding files and folders in windows
  2. Shutting down Bash on Ubuntu on Windows and refreshing my LocalAppData
  3. Restarting Windows and checking my LocalAppData
  1. 在 Windows 中取消隐藏文件和文件夹
  2. 在 Windows 上的 Ubuntu 上关闭 Bash 并刷新我的 LocalAppData
  3. 重新启动 Windows 并检查我的 LocalAppData


Screenshots of LocalAppData:

LocalAppData 的截图:

Screenshot 1

截图 1

Screenshot 2

截图 2

I can add more information if needed.

如果需要,我可以添加更多信息。

回答by drew7721

It was actually moved in the latest release to :

它实际上在最新版本中移动到:

C:\Users\%USERNAME%\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\

C:\Users\%USERNAME%\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\

See this blog post from WLS git repo

请参阅WLS git repo 中的这篇博文

回答by xern

You have to uncheck "Hide protected operating system files (recommended)" in the folder options window.

您必须在文件夹选项窗口中取消选中“隐藏受保护的操作系统文件(推荐)”。

回答by Bogdan

The selected solution is old and valid for Ubuntu only.

所选的解决方案是旧的,仅对 Ubuntu 有效。

For Opensuse leap-15.1 users this is different:

对于 Opensuse leap-15.1 用户,这是不同的:

  • C:\Users\"yourusername"\AppData\Local\Packages\46932SUSE.openSUSE-Leap-15-1_022rs5jcyhyac\LocalState\rootfs

  • C:\Users\"您的用户名"\AppData\Local\Packages\46932SUSE.openSUSE-Leap-15-1_022rs5jcyhyac\LocalState\rootfs

The numbers will differ from version to version and may change in the future.

这些数字会因版本而异,将来可能会发生变化。

The trick is to look for something related to Linux in C:\Users\"yourusername">\AppData\Local\Packages\"xxxxx"\LocalState\root\fs

诀窍是在 C:\Users\"yourusername">\AppData\Local\Packages\"xxxxx"\LocalState\root\fs 中查找与 Linux 相关的内容

where

在哪里

  • "yourusername" is your Windows 10 user login
  • "xxxxx" is a custom name related to the Linux distribution installed
  • “您的用户名”是您的 Windows 10 用户登录名
  • “xxxxx”是与安装的 Linux 发行版相关的自定义名称

回答by Alex Cui

In the latest version of Windows Fall Creator Update, I found it in C:\Users\%USERNAME%\AppData\Local\lxss\

在最新版本的 Windows Fall Creator Update 中,我在 C:\Users\%USERNAME%\AppData\Local\lxss\