- WSL 2 allows you to attach physical disks and VHD/VHDX and mount ext4 natively with wsl --mount.
- For discs Windows Use DRVFS; for Linux (ext4) first identifies partitions with --bare, lsblk and blkid.
- Manage space with wsl --manage or manual methods (diskpart + resize2fs) and repair with e2fsck.
- Keep in mind the limitations: full disks, kernel-supported types, and lack of support USB in wsl --mount.

If you work with Linux and Windows daily, be able to mount and read ext4 disks without leaving your Windows PC It's truly amazing. With WSL 2, this is possible thanks to the wsl.exe --mount command, which allows you to attach physical disks and also VHD/VHDX directly to your installed Linux distributions.
In this practical and very complete guide I'll tell you, step by step, How to identify disks, mount specific partitions, and choose the file system typeYou'll learn how to access data from Windows Explorer and how to troubleshoot common errors. You'll also see how to increase the size of the WSL 2 virtual disk and what limitations exist today.
What is wsl –mount and when to use it
With WSL 2 we can run a real Linux kernel on Windows and, thanks to that, Mount disks and partitions with native Linux file systems such as ext4The key command for this is wsl.exe –mount, which attaches a physical disk (or a VHD) to the WSL 2 lightweight virtual machine and mounts it within the distro.
It is important to distinguish between scenarios: If the volume is formatted for Windows (for example, NTFS accessible from Windows), you can expose it in WSL using drvfs without needing wsl --mount. However, when it comes to a Linux formatted disk (ext4, etc.) that Windows doesn't understand, wsl –mount comes into play.
There is one important limitation: wsl –mount does not currently support USB devices, pendrives or SD readersIf you connect a USB/SATA enclosure or a USB dock, the assembly may fail. In those cases, Microsoft recommends reviewing the guide for Connecting USB devices with usbipd-win, although it's not the same as mounting them as a block for ext4.
To find out if your computer is compatible with mounting disks from WSL, you must be in Windows 11 or use the version of WSL installed from the Microsoft StoreCheck your version with:
wsl.exe --version
Requirements, installation and initial checks
First of all, make sure you meet the requirements: Windows 10 (not S edition) or Windows 11Virtualization must be enabled in the BIOS/UEFI, and the Windows Subsystem for Linux and Virtual Machine Platform features must be installed. On modern computers, everything is usually ready, but it's a good idea to verify.
Virtualization can be verified from the Task Manager (Performance tab): if it appears Virtualization: EnabledPerfect. If not, enable it in BIOS/UEFI and, if needed, you can force its activation. Boot with:
bcdedit /set hypervisorlaunchtype auto
To install WSL automatically, open PowerShell o CMD as administrator and run a single command:
wsl --install
This command enables what's needed and installs Ubuntu by default, although you can choose another distro with wsl –install -d Debian or another from the list shown:
wsl --list --online
Once installed, you will be able to switch between WSL 1 and WSL 2, although To mount discs you need WSL 2Check active versions with:
wsl --list --verbose
If you want an experience of terminal Modern Windows Terminal (preferably its Preview version) works great with WSL. You can set the home folder as ~, install a font with icons (e.g., Nerd Fonts) and customize profiles per distro.
Access Windows drives from WSL (drvfs)
When the volume is already mounted in Windows (for example, a drive NTFS D:), wsl –mount is not neededYou can expose it within Linux with drvfs creating a directory and mounting it like this:
sudo mkdir -p /mnt/d
sudo mount -t drvfs D: /mnt/d
Then you will have D available: under /mnt/d And you'll be able to work with your files from Linux. If you need to convert paths between Windows and Linux, wslpath will solve the problem:
# Windows a Linux
wslpath "C:\\Users\\tu_usuario\\Documents"
# Linux a Windows
wslpath -w "/home/tu_usuario/proyecto"
You can also Navigating WSL file systems from Windows Using Explorer: go to \\wsl$\Distro\home\user to enter your distro and use it as if it were a network folder.
Mount Linux disks (ext4) with wsl –mount
For Linux-formatted disks that are not readable by Windows (such as ext4, the standard in many distributionsThe `wsl --mount` command lets you attach them to WSL 2, list their partitions, and mount them. Below are the two most common scenarios.

Scenario A: Unpartitioned disk
First, identify the disk using PowerShell; you can use CIM or WMIC; Both list the PHYSICALDRIVE present in the system:
# PowerShell (recomendado)
Get-CimInstance -Query "SELECT * from Win32_DiskDrive"
# WMIC (obsoleto, pero aún útil en muchos equipos)
wmic diskdrive list brief
Look at the DeviceID column, formatted \\.\PHYSICALDRIVEXOnce located:
wsl.exe --mount \\.\PHYSICALDRIVEX
If it does not have partition table, WSL will attempt to mount it directly as ext4 (default behavior). If it's not ext4, you can specify the type with --type:
wsl.exe --mount \\.\PHYSICALDRIVEX --type vfat
Scenario B: Partitioned disk
When you don't know what's inside, it's better Attach the disk without mounting it. using the –bare option and listing the partitions from Linux:
# En PowerShell
wsl.exe --mount \\.\PHYSICALDRIVEX --bare
Now, within WSL 2, list the blocking devices and its partitions with:
lsblk
You'll see something like this: /dev/sdb, /dev/sdb1, /dev/sdb2…. For identify the file system For each partition, use:
sudo blkid /dev/sdb1
Once you have a clear index and type, Mount the partition from Windows specifying both parameters:
wsl.exe --mount \\.\PHYSICALDRIVEX --partition 3 --type ext4
By default, the mount point is created under the configuration value automount.rootwhich is /mnt/wsl. This way, your disk will appear in a folder within that directory, and from Windows you can navigate to \\wsl$\YourDistro\mnt\wsl\Name to access the data.
Options, mount name, partition and unmount styles
WSL 2 tries to mount the entire disk in ext4 if you don't specify otherwise, but you can fine-tune it with these options: –type , –partition , –optionsExample of an ext4 option:
wsl.exe --mount \\.\PHYSICALDRIVEX --options "data=ordered"
If the disk diagram does not match the automatic mounting, –bare lets you block the device inside WSL so you can mount it manually from Linux (mount, fsck, etc.). You can also customize the mount point name with `--name`.
wsl.exe --mount \\.\PHYSICALDRIVEX --name mis_datos
To unmount and disassemble a disk from WSL 2:
wsl.exe --unmount \\.\PHYSICALDRIVEX
# Si omites la ruta, desmonta todos los discos adjuntos
wsl.exe --unmount
Current limitations to take into account
- Only full discs can be attached (not loose partitions). It is not possible to read the Windows boot disk partition with wsl –mount.
- Only file systems natively supported by the kernelUser-space controllers such as ntfs-3g are not used with wsl --mount.
- Systems not supported by the kernel can be mounted after –bare with FUSE from Linux.
- There is no support for USB, pendrives or SD via wsl –mount. Check usbipd-win to redirect USB, knowing that it is not the same flow.
Mounting VHD/VHDX virtual disks with WSL
In addition to physical discs, you can mount virtual hard drive files (VHD/VHDX). First, Attach the VHD file in Windows with administrator privileges and obtain its disk number:
Write-Output "\\.\PhysicalDrive$((Mount-VHD -Path <pathToVHD> -PassThru | Get-Disk).Number)"
With that path, proceed as with a physical disk, following the previous sections. You can also use –vhd when mounting the .vhdx file directly:
wsl.exe --mount <path-to.vhdx> --vhd
Each WSL 2 distribution stores its rootfs in a file ext4.vhdxIt's usually located in %LocalAppData%\Packages\LocalState. To manipulate this file (for example, to mount it manually), make sure you Stop WSL with wsl –shutdown before touching it.
Disk space in WSL 2 and how to increase it
WSL 2 uses dynamic VHDs for each distro, formatted in ext4Storage expands as needed up to a default maximum of 1 TB in the latest versions (previously 512 GB or 256 GB). To check available space, you can run:
wsl.exe --system -d <nombre-distro> df -h /mnt/wslg/distro
# Si no te funciona, actualiza WSL desde Store o usa: wsl df -h /
The exit details the total size, used, available and percentageIf you run out of space, you can expand the VHD with wsl –manage (WSL 2.5 or later) or do it manually with diskpart and resize2fs.
Expand with wsl –manage (recommended)
First turn off WSL:
wsl.exe --shutdown
After resizes by passing a valid memory string (only integers with B, MB, GB or TB):
wsl --manage <nombre-distro> --resize 512GB
If everything goes well, you'll see messages from e2fsck and resize2fs indicating that the operation was completed.
Step-by-step manual enlargement
If you prefer the classic method, this is the summarized flow that works very well when You don't have wsl –manage:
- Turn off WSL: wsl.exe –shutdown
- Locate the ext4.vhdx file of your distro (below you have a script to find it).
- Open CMD/PowerShell as administrator and enter diskpart:
diskpart
- Select the VHD by path (replace ):
Select vdisk file="<pathToVHD>"
- View the current virtual size:
detail vdisk
- Decide the new size in MB (for example, from 512 GB to 1024 GB → 1024000 MB) and expand:
expand vdisk maximum=<sizeInMegaBytes>
- Exit diskpart, boot the distro and force the resizing of ext4:
sudo mount -t devtmpfs none /dev
mount | grep ext4
# Identifica el dispositivo, por ejemplo /dev/sdb
sudo resize2fs /dev/sdb 2048000M
After this, the ext4.vhdx will now have the new size and df -h will reflect more available space.
Troubleshooting common problems with wsl –mount
A common mistake when mounting from PowerShell is: "The disk connected but could not be mounted (code -22)"Run `dmesg` within WSL for more details. Messages like "EXT4-fs: VFS: Can't find ext4 filesystem" usually indicate that you're not pointing to the correct partition, the volume isn't ext4, or you need to use `-bare` and mount manually.
If you connect the disk with a USB case or adapterRemember that `wsl --mount` does not support USB. Even if `lsblk` shows `sdd`, `sde`, etc., automatic mounting may fail for that reason. In that case, try these guidelines:
- Attached with –bare and check partitions in WSL: lsblk and sudo blkid /dev/sdXN.
- If the file system is not ext4 (e.g., xfs, vfat), indicate –type while riding.
- If the disk uses LVM, RAID or encryption, wsl –mount will not handle it directly.
- Check the partitioning style (MBR/GPT) and that the index passed with –partition be the correct one.
Another case is booting the distro in read-only mode After a power outage, you'll see the message "An error occurred mounting the distribution disk; it was mounted read-only as a fallback," and you won't be able to write to it. To fix this, run the following command from PowerShell as administrator:
- WSL closes: wsl.exe –shutdown
- Mount the distro's VHD in bare mode:
wsl.exe --mount <path-to-ext4.vhdx> --vhd --bare
- Identify the device with wsl.exe lsblk and repair with e2fsck (replace ):
wsl.exe sudo e2fsck -f /dev/<device>
- Disassemble: wsl.exe –unmount and restart the distro.
If you need locate the ext4.vhdx From a specific distro, run the following in PowerShell:
(Get-ChildItem -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss | Where-Object { $_.GetValue("DistributionName") -eq '<distribution-name>' }).GetValue("BasePath") + "\ext4.vhdx"
Finally, if you're on Windows 10 and don't see the functionality, keep in mind that wsl --mount support is not yet available. It was born in Insider builds (like 20211) and later arrived via WSL in the Microsoft StoreInstall the WSL version from the Store and update with wsl-update to get the latest features, or upgrade to Windows 11.
Useful WSL commands that will save you time
To keep the environment up to date, you can update the WSL kernel manually and revert if something doesn't convince you:
wsl --update
wsl --update rollback
Shut down all instances (ideally before resizing VHDs or mounting VHDXs): wsl –shutdownIf a distro freezes, finish it on its own:
wsl --terminate <NombreDistro>
To migrate or back upExport to TAR and import a new distro to a different path. You can even choose WSL 1 or 2 during the import process.
wsl --export <NombreDistro> backup-wsl.tar
wsl --import <NombreDistroNueva> C:\wsl\debian backup-wsl.tar --version 2
If you're going to reinstall a distro from scratch, remember that –unregister deletes all data associated with that instance:
wsl --unregister <NombreDistro>
And when you need to mount or unmount from Windows, always have the quick reference from the assembly command itself:
# Montar disco físico completo en ext4 (por defecto)
wsl --mount \\.\PHYSICALDRIVEX
# Adjuntar sin montar para decidir después
wsl --mount \\.\PHYSICALDRIVEX --bare
# Montar partición concreta y tipo específico
wsl --mount \\.\PHYSICALDRIVEX --partition 1 --type ext4
# Montar VHD/VHDX
wsl --mount C:\\ruta\\disco.vhdx --vhd
# Desmontar (uno o todos)
wsl --unmount \\.\PHYSICALDRIVEX
wsl --unmount
With all of the above, you have a powerful workflow at your disposal: Access ext4 disks, work with VHDs, expand storage space, and repair errors without abandoning Windows. WSL 2 integration has matured enough to be a stable solution for developers and administrators who move between both worlds.
Passionate writer about the world of bytes and technology in general. I love sharing my knowledge through writing, and that's what I'll do on this blog, show you all the most interesting things about gadgets, software, hardware, tech trends, and more. My goal is to help you navigate the digital world in a simple and entertaining way.

