Microsoft added to WSL2 (Windows Subsystem for Linux) the ability to mount disks

Microsoft company reported about expanding the functionality of the WSL2 subsystem (Windows Subsystem for Linux), which provides the launch of Linux executable files in Windows.
Starting with Windows Insiders build 20211, WSL2 added support for mounting filesystems from physical drives.

For mounting, the “wsl –mount” command is proposed, with the help of which, among other things, you can mount a partition with a file system that does not have built-in Windows support in WSL, for example, you can access a partition with an ext4 file system. This feature can be used to organize work with the same Linux partition if there are several operating systems (Windows and Linux) on the computer.

Microsoft added to WSL2 (Windows Subsystem for Linux) the ability to mount disks

Mounted partitions become visible not only in the WSL Linux environment, but also in the main system through the "\wsl$" virtual disk in the File Explorer file manager.

Microsoft added to WSL2 (Windows Subsystem for Linux) the ability to mount disks

Recall that the WSL2 edition is different delivery of a full-fledged Linux kernel instead of the previously used emulator that translated Linux system calls into Windows system calls. The Linux kernel in WSL2 is not included in the Windows installation image, but is loaded dynamically and kept up to date by Windows, similar to how graphics drivers are installed and updated. The standard Windows Update mechanism is used to install and update the kernel.

Proposed for WSL2 core is based on the Linux 4.19 kernel release, which runs in a Windows environment using a virtual machine already running in Azure. WSL2-specific patches applied in the kernel include optimizations to reduce kernel startup time, reduce memory consumption, return memory freed by Linux processes to Windows, and leave the minimum required set of drivers and subsystems in the kernel.

The WSL2 environment runs in a separate disk image (VHD) with an ext4 file system and a virtual network adapter. As in WSL1 userspace components Are established separately and are based on assemblies of various distributions. For example, to install in WSL in the Microsoft Store catalog offered assembly Ubuntu, Debian GNU/Linux, Kali Linux, Fedora,
Alpine, SUSE и openSUSE.

Source: opennet.ru

Add a comment