Reversion from WSL2 to WSL1

dkapur17 picture dkapur17 · Jun 20, 2020 · Viewed 12.6k times · Source

I am a big fan of WSL and was totally psyched when they announced WSL2. However, the official Docs said that WSL2 isn't as performant as WSL1 when it comes to working with files in the Windows File system. This is kind of a bummer because most of my work is in the Windows File System itself and I would like to keep it that way.

But for the sake of checking it out, I converted my main Distro to WSL2:

wsl --set-version Ubuntu-18.04 2

The conversion was successful. Then when I ran

cd
explorer.exe .

It launched a file explorer in Network\wsl$\Ubuntu-18.04\home\user. I knew that this is a feature in WSL2; that we could access the Linux file system using the Windows Explorer.

However, I then decided to revert back to WSL1 (file system access). So I ran the command:

wsl --set-version Ubuntu-18.04 1

And just to cross check, running

wsl --list --verbose

Lists my main distro as running version 1.

But now if I head over to ~ and run explorer.exe ., it still opens up the directory in the File Explorer! AFAIK, this normally gives the error that windows can't access file paths with the Linux structure or something like that when run with WSL1.

So I was wondering if this is normal, or did it happen because of the reversion, or did I somehow break my installation?

TIA!

Answer

NotTheDr01ds picture NotTheDr01ds · Jul 27, 2020

Sounds "Normal" to me. Support for accessing WSL files safely from Windows was added to WSL1 in Windows 10 version 1903 a bit over a year ago. See https://devblogs.microsoft.com/commandline/whats-new-for-wsl-in-windows-10-version-1903/

I guess I'm more surprised that you received an error message with 2004 when trying to access WSL1 from Explorer. Perhaps you were just assuming it would still fail from your experience pre-1903?