A Deep Dive Into How WSL Allows Windows to Access Linux Files

Craig Loewen

Three months ago, we announced that the Windows Subsystem for Linux will be able to access Linux files from Windows in the blog post: What’s new for WSL in Windows 10 version 1903, and in today’s post we will be showing you how we made these changes possible.

Let’s jump in!

We’re continuing our whiteboard series of deep dives (you can find the full list here) with a new video where Sven Groot and Craig Loewen explain the full architecture behind this new feature. You can expect to learn about how WSL currently accesses Linux files, how we’ve added a 9P file server into the init process of each Linux distro, and how Windows interacts with that 9P file server to interact with Linux files inside of your distro. So, grab a coffee and a snack, sit down, relax, and enjoy this look behind the scenes of WSL!

You can also view this video on Channel 9 and on YouTube.

How does this story fit in with WSL 2?

We don’t explicitly mention WSL 2 in the video above as at the time of filming we were still finalizing the details behind WSL 2, and ultimately there are very little changes to our explanation of how Linux files are accessed from Windows with the new architecture.

The only difference from the explanation in the video, is where the Linux files themselves are stored. In WSL 1, these Linux files are stored in the Windows drive (which uses the NT file system), while in WSL 2 these Linux files are stored in a virtual hard disk which uses the EXT4 file system. Every other detail on how the files are accessed remains the same.

What would you like to see next?

If you have more questions about how we use a 9P file server, accessing Linux files, or just about WSL in general you can find a list of our team members on twitter here! Please feel free to reach out to ask us any questions, and give suggestions on any other deep dives that you’d be interested in seeing.


Comments are closed. Login to edit/delete your existing comments

  • Dean Jackson 0

    The “Load more” button at the bottom of this page will continually load the same comments that are already showing on the page.

  • Leandro Arajo 0

    Let’s say I have a full blown Linux partition in some physical disk in my rig. Is it possible to mount that extern linux partition and access content in WSL2? And what about the opposite? To use an linux instalation or pendrive linux to access the content in this virtual disk from WSL2?

  • waffen SS 0


Feedback usabilla icon