How to access Linux files on Windows 10

Windows 10, April 2019 update brings a long-awaited feature: Support for easy access, viewing and even modification of Windows subsystem for Linux files (WSL) from File Explorer or via stream command.

Windows 10, April 2019 update brings a long-awaited feature: Support easy access, view and even modify Windows Subsystem for Linux (WSL) files from File Explorer or via stream command.

Previously, Linux files could be found in the AppData directory, but Microsoft warned against editing the files. Modifying the files here will break everything. Now, there is an official, easier way to access these files with Windows tools without risking any problems!

Craig Loewen from Microsoft explained how it works: Instead of directly accessing these files, Windows runs the Plan 9 server as part of the WSL software in the background. Windows 10 has a Windows service and the driver works as a client and communicates with the Plan9 server. The server translates user file operations and handles Linux metadata such as file access, ensuring everything works correctly even when users access the file using Windows tools. But those are just complicated things that happen in the background, and users don't need to care about it.

You can open the File Explorer window directly in the current directory from within the Linux shell environment. Just type the following command into the Bash shell:

 explorer.exe . 

You can work with normal files from here. Use drag and drop, copy and paste them, or even open them directly in Windows applications to modify.

How to access Linux files on Windows 10 Picture 1How to access Linux files on Windows 10 Picture 1

Microsoft may change the way it works in the future. But, now, users can also enter the following path into the Explorer window to access the files of a Linux distribution:

 wsl$ 

In other words, if you're running Ubuntu's Bash shell, enter:

 wsl$Ubuntu 

Of course, this also works from the command line. In PowerShell or Command Prompt, the wsl $ Debian cd command changes the root directory of the installed Debian system.

How to access Linux files on Windows 10 Picture 2How to access Linux files on Windows 10 Picture 2

Windows Subsystem for Linux users have been expecting this feature for a long time. In 2016, Rich Turner from Microsoft wrote that he must warn people not to access their Linux files in File Explorer at least two or three times a day. Now finally there is a way to do this without causing any risk to the system.

4 ★ | 1 Vote