How To: Access Windows Subsystem for Linux (WSL) Files on Windows 10



RECOMMENDED: Click here to fix Windows errors and optimize system performance

The connection between Linux and Windows is getting closer and closer. Now that Microsoft has supported Linux with the WSL (Windows Subsystem for Linux), it is doing what users have asked it to do: The Windows 10 April 2019 update allows access to Linux files from Windows.

Version 1903 of Windows 10 not only gives you the ability to open Linux files in the Explorer, but also the ability to edit Linux files on Windows.

One of the most surprising things about Windows 10 is that you can activate a Windows subsystem for Linux, install a Linux distribution like Ubuntu, and then run Linux commands in a Bash shell.

What is a Windows subsystem for Linux (WSL)?

The Windows for Linux Subsystem (WSL) is a new feature of Windows 10 that allows you to run native Linux command line tools directly on Windows in addition to your traditional Windows desktop applications and modern shop applications.

This feature has been available in one form or another since early 2016, but Microsoft is constantly working to improve the way Windows and Linux can be shared.

For example, you couldn’t start Windows applications from a Linux terminal at an early stage. Now you can. And although you have been able to access Windows files from a Linux terminal for some time now, it is not the opposite that happens. But it will be soon.

How to access Ubuntu files (Windows subsystem) from Windows 10

Although we show this tutorial for the Ubuntu subsystem, the process will be the same for other systems installed on the WSL, such as OpenSUSE, Kali, and others.

The address at which Windows 10 WSL stores the Linux environment file: %user profile%AppDataLocal packages

To access Linux WSL files on Windows 10, do the following.

  1. Enable the WSL function.
  2. Install Distro, for example Ubuntu, and start it.
  3. If you are in a directory under Linux FS, type explorer.
  4. This will open a File Explorer window located inside your Linux distribution.


April 2021 Update:

We now recommend using this tool for your error. Additionally, this tool fixes common computer errors, protects you against file loss, malware, hardware failures and optimizes your PC for maximum performance. You can fix your PC problems quickly and prevent others from happening with this software:

  • Step 1 : Download PC Repair & Optimizer Tool (Windows 10, 8, 7, XP, Vista – Microsoft Gold Certified).
  • Step 2 : Click “Start Scan” to find Windows registry issues that could be causing PC problems.
  • Step 3 : Click “Repair All” to fix all issues.

download



From there, you can access all Linux files, just like any other file in the File Explorer. This includes operations such as: Drag and drop files in both directions, copy and paste, and even use custom context menu items added by Notepad++, VSCode, and other software.

The File Explorer displays the distribution files as a virtual network share under the path \\\wsl$\\.

Accessing Linux files from running WSL Distro in PowerShell

1. open a PowerShell or a raised PowerShell.

2. copy and paste the wsl –list – which works in PowerShell, then press Enter to display the current WSL distortions. Note the name of the WSL distribution (for example, Ubuntu) for which you want to access the files. (see screenshot below)

Type the following command in PowerShell and press Enter to go to the WSL distribution directory.

cd \wsl$\NameDistributionName>>NameDistribution

Replace in the above command with the real name of the WSL distribution (e. g. “Ubuntu”) you want in step 2.

For example: cd \wsl$\Ubuntu

Enter them at the command prompt and press Enter to display the above directory.

You can now access your Linux files as usual in PowerShell.

Start the root from the file explorer

It is a relatively simple method.

  1. Start the File Explorer.
  2. Type Linux and press Enter in the address bar of the file explorer.
  3. It will mount the memory for the Linux distributions installed on your computer.
  4. The files are visible in the File Explorer.

After accessing these files in the File Explorer, you can run them normally with the programs installed on your computer. And all the changes you make will be visible in the Terminal window.

https://superuser.com/questions/1083962/windows-linux-subsystem-accessing-files-outside-of-ubuntu



RECOMMENDED: Click here to troubleshoot Windows errors and optimize system performance