Windows 10s May 2019 Update introduced a straightforward, safe, and officially supported solution to access and use your Linux files from within File Explorer along with other applications. Heres ways to get at your Windows Subsystem for Linux (WSL) files.
Unlike previous methods, it is a safe solution to use Linux files! Windows does some magic in the backdrop, to be able to edit your Linux files from Windows applications without causing file permission issues. You still shouldnt modify the underlying files at their real location on your own system.
Note: It doesnt matter if you are using WSL1 or WSL2. These commands all function a similar way.
You can find two methods to access your Linux files. First, the simple one. From within the Windows Subsystem for Linux environment you would like to browse, run the next command:
This can launch File Explorer showing the existing Linux directory it is possible to see the Linux environments file system from there.
You may also access them directly at a
wsl$ path. In File Explorer or any Windows application that may browse files, demand following path:
Youll start to see the folders for all you installed Linux distributions, which are exposed as though these were network shares. For instance, Ubuntu 22.04 usually can be acquired at
Feel absolve to develop a shortcut to the folder for instance, you can drag it to the FAST ACCESS section in File Explorers sidebar.
Again, it is possible to modify these files normally as though they were any kind of file on your own system. Modify files with Windows tools (Notepad even supports Unix line endings!), create new files in the Linux folders, delete files, or do other things you prefer. Windows will ensure nothing goes wrong and the files permissions are updated properly.