One of the most surprising things about Windows 10 is that you have the option of enabling a Windows Subsystem for Linux, installing a Linux distribution such as Ubuntu, and then running Linux commands in a Bash shell.
The feature has been around in one form or another since early 2016, but Microsoft keeps fine-tuning the way Windows and Linux can be used together.
For example, early on, you couldn’t launch Windows applications from a Linux terminal. Now you can. And while you’ve been able to access Windows files from a Linux terminal for a while, the opposite hasn’t really been true. But soon it will be.
Microsoft has announced that starting with Windows 10 version 1903, you can access Linux files using native Windows tools.
Want to open the Windows Explorer and browse your Linux file system? You can fire up a Bash shell, navigate to the directory you want to view, and then type “explorer.exe .” (without the quotes) to open that directory in Explorer. Then you can drag and drop files between Windows and Linux, open files in a text editor, copy and paste, or make other changes.
You could also theoretically just open File Explorer and navigate to your Linux file system, but right now that’s a bit tricky because the path will look something like “\\wsl$\<running_distro_name>\”.
Microsoft’s Craig Loewen says developers are “actively investigating ways to improve the discoverability of your Linux files inside of File Explorer” in the future.
If you’d prefer to use command line tools, you can fire up PowerShell and navigate to your Linux directory. But if you’re comfortable with the command line, I’m not entirely sure why you wouldn’t just stick with Bash.
Microsoft notes that there are some limitations. Currently your Linux distro needs to be running if you want to access its files. But that may change in the future. And although it looks like you’re just accessing files on your computer using Explorer or PowerShell, the Windows Subsystem for Linux is actually accomplishing this by setting up a Linux server and treating Windows as the client — so Windows will effectively treat your Linux files as if they were on a network drive rather than a local drive, which could cause some commands not to function as you’d expect them to.
You can read more about the latest changes to the Windows Subsystem for Linux in Loewen’s blog post on the topic.