Browse Windows Subsystem for Linux files with Windows Explorer

Windows Subsystem for Linux is great feature for running Linux programs and trying out multiplatform ASP.NET Core applications under Linux. It is possible to browse and edit files on disks mounted to WSL but it didn’t worked with files on WSL “disks”. With next version of Windows it will change.

Why this feature? Windows guys usually doesn’t feel very comfortable using shell window tools and editors popular in Linux world. When editing configuration or code files we want to use our favorite tools. In no means I want to say that Windows guys on Linux should avoid Linux tooling. No, go and get familiar what Linux has to offer. There are many great tools available.

Accessing WSL files

Next version of Windows solves the problem and files in Windows Subsystem for Linux will be available in Windows Explorer. It’s not hack but fully supported scenario.

Trick is simple. When WSL starts there will be new “network drive” available. It has name derived from the name of Linux distro running on WSL. I have Ubuntu 18.04 installed on my development box. Here’s how I can see its file system from Windows Explorer.

Windows Subsystem for Linux: Browing files with Windows Explorer

Those who make more use of WSL probably want more.

Mapping WSL disk as network drive

We can map WSL “disk” as network drive through Windows Explorer and for this we must use same path as before.

Windows Subsystem for Linux: Mapping WSL disk as network drive

Settings on screenshot above were enough for me to get my Ubuntu “disk” mapped as U: drive.

Windows Subsystem for Linux disk mapped as network drive

This drive mappings works well on my machine even when my Ubuntu is closed and not in use.

Wrapping up

Those who build and test multiplatform .NET Core and ASP.NET Core applications on Windows Subsystem for Linux can now easily access WSL files through Windows Explorer. It’s also possible to create and edit configuration files and all other files one needs on WSL. We can map WSL file system as network drive to access it easily.

Gunnar Peipman

Gunnar Peipman is ASP.NET, Azure and SharePoint fan, Estonian Microsoft user group leader, blogger, conference speaker, teacher, and tech maniac. Since 2008 he is Microsoft MVP specialized on ASP.NET.

    Leave a Reply

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