how_to_access_your_linux_wsl_files_from_windows

How to Access Your Linux WSL Files from Windows

Access Your Linux WSL Files from Windows

How to Access Your Linux WSL Files in Windows

Windows 10’s May 2019 Windows Update finally offers an easy, safe, and officially supported way to access and work with your Linux files from within File Explorer and other applications. Here’s how to get at your Windows Subsystem for Linux files.

Unlike previous methods, this is a safe way to work with Linux files! Windows does some magic in the background, making it possible to edit your Linux files from Windows applications without causing file permission issues.

NOTE!!!: You still shouldn’t modify the underlying files at their real location on your system.

There are two ways to access your Linux files from Windows. First, the easy one. From within the Windows Subsystem for Linux environment you want to browse, run the following command:

explorer.exe .

This will launch File Explorer showing the current Linux directory — you can browse the Linux environment’s file system from there.

Viewing a Linux environment's files in File Explorer

You can also access them directly at a \\wsl$ path. In Windows File Explorer or any other Windows application that can browse files, navigate to the following path:

\\wsl$

You’ll see the Linux folders for all your installed Linux distributions, which are exposed as if they were Windows network shares. For example, Ubuntu 18.04 usually is available at \\wsl$\Ubuntu-18.04 .

Feel free to create a shortcut to this folder — for example, you could drag it to the Quick Access section in File Explorer’s sidebar.

Windows 10 showing \\wsl$ network location in File Explorer

Again, you can modify these files normally as if they were any other type of file on your system. Modify files with Windows tools (Notepad even supports Unix line endings!), create new files in the Linux folders, delete files, or do anything else you like. Windows will ensure nothing goes wrong and the Linux file’s permissions are updated properly.

Fair Use Sources:

how_to_access_your_linux_wsl_files_from_windows.txt · Last modified: 2024/04/28 03:28 by 127.0.0.1