Windows 中的 Windows bash 目录在哪里?

Pat*_*ick 17 bash windows-10 windows-subsystem-for-linux windows-10-v1607

我已经在我的电脑上安装了 Windows 10 周年更新。

我想知道/rootBash 提示中的目录在 Windows 中的什么位置?

我希望能够在 Bash 中编写也可以从 Windows 访问的文件

即-如果我这样做:

touch /root/foo

我在哪里可以访问foo我的电脑

小智 11

我相信这个链接会回答你的问题:

https://askubuntu.com/questions/759880/where-is-the-ubuntu-file-system-root-directory-in-windows-nt-subsystem-and-vice

简而言之:

%localappdata%\Lxss\rootfs

或者

C:\Users\Username\AppData\Local\Lxss\rootfs

  • `rootfs` 是骗人的。里面的 `home` 目录中没有任何内容,它实际上位于 `C:\Users\<user>\AppData\Local\lxss\home\`。 (5认同)