The Windows subsystem for Linux has changed the way things are done in Windows 10. Especially for the most curious users, the advanced users, developers and technicians. Thanks to WSL, any Windows 10 user can have their own Linux Kernel within Windows, run it in isolation and even, soon, have their own graphical environment to run any program from it. With the arrival of WSL2, the second version of this tool, Microsoft has gone one step further. And now the integration with Linux is such that, finally, we can mount EXT4 hard drives in Windows without using other programs.
Until now, users who wanted to mount Linux EXT4 hard drives in order to access their data or copy files had to resort to third-party programs to do so. These programs acted as “drivers” so that the operating system could recognize these systems and work with them as if they were NTFS drives. This type of software is not exactly fast, nor is it stable. And most of the programs are even already unsupported. Mounting Linux drives on Windows was getting more and more difficult.
With the arrival of WSL, things have changed. Especially with version 2 of the Windows subsystem for Linux. From now on, users who work with both operating systems will be able to mount their Linux drives directly on Windows 10, without special programs for this. It is not an automatic process, nor is it fast. But by learning a series of commands we will be able to access these units, and all their data, whenever we want.
Mount an EXT4 disk in Windows 10
Unfortunately, Microsoft has not (yet) made this process semi-automatic, or double-clicking on the drive. Windows 10 forces us to identify the drive and mount it manually using commands in order to start using these drives.
The requirements that we will need to be able to use this function are:
- Windows 10 Pro.
- Hyper-V activated.
- Windows subsystem for Linux enabled.
- Latest version of Windows installed (WSL2 compliant).
To carry out this task we have to follow a series of steps.
Identify the unit
The first thing we will have to do is identify the unit that we want to mount. It can be a complete hard drive, internal or external, or a single partition. But we have to know what it is. To do this, what we must do is run the following command in a CMD window:
wmic diskdrive list brief
In the list of elements that will appear, we will have to look at the “DeviceID”, since it will be the identifier of the hard disk.
Once we identify the disk, we will start with the assembly. Of course, before continuing we must indicate that, once the unit is mounted, it will be blocked and will be inaccessible to Windows. To use it again in Windows 10 we will have to disassemble it.
Mount EXT4 disk
To mount the drive, what we have to do is use the command ” wsl –mount “, followed by the disk identifier. For example, supposing that our unit only has one partition (and all of it is in EXT4), and it is the first one that we have connected to the PC, the command that we must execute will be:
wsl --mount .PHYSICALDRIVE0
If our hard drive has several partitions, and only one of them is in EXT4, then what we must do is select the partition with the «partition» parameter. In this way, the command would be as follows:
wsl --mount .PHYSICALDRIVE0 --partition 1
We remember that we must change both the disk identifier and the partition number so that it adapts to our unit. Once the command is executed, we can see that in the file explorer, in the right bar, a new Linux icon appears, and within it all the directories of the unit in EXT4.
The EXT4 units will also be accessible from any distro that we have installed in WSL. We will find these units within the point “/ mnt” of the WSL distro.
When we have already done everything we have to do, and we do not want the EXT4 unit to remain mounted in Windows 10, we can unmount it. This must also be done with a simple command, only instead of using the «mount» parameter we will have to use «unmount». Thus, to dismount the unit that we have mounted in the previous points we will have to execute the following:
wsl --unmount .PHYSICALDRIVE0
Mount hard drives on other file systems
By default, WSL is configured so that using wsl –mount mounts the drives in an EXT4 file system in Windows 10. But this, although it is the most used system, is not the only one. There are users who prefer to use other file systems (such as VFAT, BTRFS, and even NTFS, although this would not make much sense) that bring other advantages to drives and hard drives.
WSL will allow us to mount drives on any file system that is directly supported by the Linux Kernel. To do this, all we have to do is use the “-t” parameter followed by the file system we want to mount. For example, to load a drive formatted in VFAT, we can do it with the command:
wsl --mount .PHYSICALDRIVE0 --partition 1 -t vfat
And in the case of wanting to mount one in btrfs, the command would be:
wsl --mount .PHYSICALDRIVE0 --partition 1 -t btrfs
Alternatives to read and write EXT4 in Windows 10
Now that it is possible to use WSL to have official support for this file system, using third-party programs for it is meaningless. However, there are users who probably prefer to continue using these programs. Especially those who have Windows 10 Home, not being able to use WSL due to the lack of support for Hyper-V.
Some of the programs that allow us to do this are:
If what we want is a free program, this is one of the ones that works best. With it we will be able to mount all types of Linux partitions in Windows, so that we can access the data of the EXT2, EXT3 and EXT4 units almost natively. We will be able to read and write data to these drives, as if they were NTFS, and even configure them to mount automatically at Windows startup and have them ready from the start.
We can download the tool from the developer’s official website.
Linux File Systems for Windows
If what we are looking for is a program developed and controlled by a well-known company, such as Paragon, this program will help us to work with Linux units in Windows 10. This program will allow us to mount any Linux unit , both EXT (2, 3 and 4) as BTRFS or XFS, to be able to use them as if they were Windows NTFS drives.
It is available on the official Paragon website.