How to Mount Ubuntu Linux File System on Windows WSL

|

,

|

The article explains how to mount an Ubuntu Linux file system on Windows 11 using the Windows Subsystem for Linux (WSL). This enables running a GNU/Linux environment directly in Windows, without a virtual machine or dual-boot. The process involves configuring the WSL environment, running PowerShell commands to mount physical Linux drives, and accessing contents through…

This article describes the steps 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 directly in Windows without setting up a virtual machine or dual-boot, including most command-line tools, utilities, and applications.

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, 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, you will run the commands below to mount a FAT file system.

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, browse the drive’s content using File Explorer.

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

\\wsl$\\UBUNTULINUX\\MOUNTFOLDER

That should do it!

Conclusion:

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

Like this:



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.