linux - 在 WSL2 中挂载原生 ext4 分区

标签 linux windows windows-subsystem-for-linux disk-partitioning

关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。












想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。

去年关闭。




Improve this question




我经常在 Windows 和 Linux(双启动)上工作,我使用 ntfs 分区来同步系统之间的数据,这是有问题的(许多 docker 容器在使用 ntfs 权限时存在问题)。我试图在 wsl1 中挂载一个 ext4 分区,但这是不可能的,但我读到随着 WSL2 的发布,它可以实现。我试过这样做,但不知道如何做到。真的有办法在 wsl2 中挂载原生 ext4 以在 linux 和 wsl2 之间共享一个分区吗?

最佳答案

Windows Subsystem for Linux Brings the Full 4.19 Kernel to Windows说过 -

In WSL 2, the Linux filesystem is now just using EXT4 directly over a virtual pmem device, so we get Linux native filesystem performance on the Linux side and Windows native filesystem performance on the Windows side (best of both worlds). And with the 9P bridge, we can connect them together for a great integrated experience.



以下信息可在 Windows 10 will soon let you access Linux files from File Explorer 中找到——

Windows 10, version 1903 allows Windows 10 File Explorer to access, move and copy files stored inside Windows Subsystem for Linux distros.

To use File Explorer with WSL files, users need to open a WSL distro in Windows 10, change the directory to their Linux home folder, and type explorer.exe

This will open up the window below, which will allow users to manipulate WSL files in the same way as is possible using traditional File Explorer in Windows 10.

However, if you dual-boot Windows with a Linux-based OS, the new feature will not allow File Explorer to access EXT4-formatted partitions used by that Linux-based OS, only the file systems used by the WSL distros.

关于linux - 在 WSL2 中挂载原生 ext4 分区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58846319/

相关文章:

linux - 使用 Linux 发行版时在 Windows 下隐藏文件/文件夹

c - 获取 DLL 函数的内存地址

git - 在 Windows 和 WSL 之间共享 git repo 符号链接(symbolic link)

linux - at&t汇编中的 'push'和 'pushq'有什么区别

Linux,我想设置包含用户名的用户密码,如何设置密码策略?

linux - 自动化 iSCSI 安装/卸载

.NET/Mono 框架定位

visual-studio - 通过 Visual Studio 在 WSL 1 上使用 vcpkg

windows - 使用 WSL 和 postgresql 安装 rails

linux - QEMU:两个MCU之间的USART通信(STM32)