How to Mount Ubuntu Linux File System on Windows WSL

Share

This article describes steps one can take to mount the Ubuntu Linux file system on Windows 11 using Windows Subsystem for Linux (WSL).

Windows Subsystem for Linux lets developers run a GNU/Linux environment, including most command-line tools, utilities, and applications directly in Windows without setting up a virtual machine or dual-boot.

With the WSL environment configured, you can attach and mount physical Linux drives or mount points on Windows and explore the content via File Explorer.

This feature also works on a dual-boot system running Windows 11 and Ubuntu Linux installed on different drives.

How to mount Linux file system on Windows 11 via WSL

As described above, with the WSL environment configured, you can attach and mount physical Linux drives or mount points on Windows and explore the content via File Explorer.

Below is how to mount the Linux file system on Windows 11 with WSL configured.

Mount Linux file system on Windows WSL

To mount the Linux file system, open Windows PowerShell as administrator.

When the PowerShell app opens, run the commands below to list the available drives or volumes.

wmic diskdrive list brief

That should output something similar to the lines below:

Caption                     DeviceID            Model                       Partitions  Size
SAMSUNG MZVKW512HMJP-000H1  \\.\PHYSICALDRIVE0  SAMSUNG MZVKW512HMJP-000H1  3           512105932800
ST1000LM035-1RK172          \\.\PHYSICALDRIVE1  ST1000LM035-1RK172          1           1000202273280

Pay attention to the drive path under the ā€œDevice IDā€ column.

Now, to mount the Linux file system or drive, simply run the format of the command below from your Windows machine with WSL enabled:

wsl --mount <DISKEPATH>

The <DISKPATH> is the “DeviceID” or drive of the Linux file system you want to mount. This will mount the entire disk or physical drive.

Ex.

wsl --mount \\.\PHYSICALDRIVE0

If you want to mount a partition instead of the entire physical drive, you will use the –partition option with the command.

wsl --mount \\.\PHYSICALDRIVE0 --partition 1

WSL will attempt to mount the disk as ext4. If you want to specify the file system type, use the -t option with the commands. For example, to mount a FAT file system, you will run the commands below.

wsl --mount <DISKPATH> -t vfat

Unmount the Linux file system on Windows WSL

To unmount a mounted file system, run the format of the command below:

wsl --unmount DRIVEPATH

Ex.

wsl --unmount \\.\PHYSICALDRIVE0

Access the Linux file system in Windows File Explorer

Now that the Linux file system is mounted, you can use File Explorer to browse the drive’s content.

Open File Explorer, then browse to the \\wsl$ and then to the mount folder

\\wsl$\\UBUNTULINUX\\MOUNTFOLDER
windows 11 wsl browse linux file system file explorer
windows 11 will browse Linux file system file explorer

That should do it!

Conclusion:

This post showed you how to mount a Linux file system on Windows 11 with WSL. If you find any error above or have something to add, please use the comment form below.