![当我在 Windows 上的 Ubuntu 上使用 Bash(Ubuntu 内置于 Windows 10)时,我的 Windows 根文件系统(例如 C 盘)在哪里?](https://linux22.com/image/1140380/%E5%BD%93%E6%88%91%E5%9C%A8%20Windows%20%E4%B8%8A%E7%9A%84%20Ubuntu%20%E4%B8%8A%E4%BD%BF%E7%94%A8%20Bash%EF%BC%88Ubuntu%20%E5%86%85%E7%BD%AE%E4%BA%8E%20Windows%2010%EF%BC%89%E6%97%B6%EF%BC%8C%E6%88%91%E7%9A%84%20Windows%20%E6%A0%B9%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F%EF%BC%88%E4%BE%8B%E5%A6%82%20C%20%E7%9B%98%EF%BC%89%E5%9C%A8%E5%93%AA%E9%87%8C%EF%BC%9F.png)
当我使用“Windows 上的 Ubuntu 上的 Bash”(Windows 10 内置的 Ubuntu)时,哪个目录会访问我的 Windows 文件系统(例如 C 盘、我的文档等)?
例如,我的用户名是“ed”,因此当我启动 bash 时,我位于:/home/ed
我希望能够访问类似以下内容的内容:
- 计算机目录:\Windows
- C:\用户\Ed\文档
在 bash shell 中哪里可以找到 Windows 根文件系统?
答案1
我能够通过在 Ubuntu bash 命令行上使用“locate”搜索文档中存在的文件来解决这个问题。耶!
- /mnt/c/Windows
- /mnt/c/用户/Ed/文档
- /mnt/d/...
答案2
在 Ubuntu bash 提示符下使用 df 读取文件系统(“C:”等)的挂载点(“/”以下)。
对于那些(像我一样)想知道 Windows 中的“/home”在哪里的人来说,它在这里:%LOCALAPPDATA%\Packages\CanonicalGroupLimited*\LocalState\rootfs\home