I've been playing around at using WSL2. This is my first time using Window Subsystem for Linux having skipped over WSL1.
I typically like to write...
For further actions, you may consider blocking this person and/or reporting abuse
You can use WSL2 file system itself. (its on
\\wls$\...
. )/mnt/c/..
is really slow as you said.if you use Debian,
\\wls$\debian
will be/
in your WSL2 distribution.WSL1 is the choice to go for if you want to have good performance across OS file systems! Check out the Comparing WSL 2 and WSL 1 on Microsoft Docs for which WSL version suits your use-case the best, since for now, Microsoft has indicated that both projects will be kept alive separately.
Thanks, I think for now I'll stick with wsl2 and run from the Linux system. I was just shocked when I was caught out by the initial slow performance.
That was interesting. I was having the same issue on WSL2, and I was surprised because WSL2 was advertised as faster. Moving the files over to
\\wsl$\Ubuntu\home\<user name>\
fixes the issueThis is the best suggestion I've found to the problem of slow compile so far.
I am now re-partitioning a spare disk to store my projects on a native Linux partition - I'll let you know!
I'm Playing with Jekyll, which needs native compilation of several gems in 2021...
I don't think this is related to file system at all, this is a bug that WSL 2 has. With the same windows folder mounted on virtualbox with Ubuntu, I can say the speed is very fast like using the pure linux. This is actually a bug from Microsoft Kernel. WSL 2 does not use pure linux Kernel.
I reverted back to WSL1, cause WSL2 is simply unusable! Around 10-20 times slower build times for my nodejs project. Like most people, I want to have access to my files residing on different NTFS disks, so I can edit them with editors & other tools. How else are you supposed to work if you stick your files in the native ext4 virtual disk?
Everything just works, just a small workaround for docker desktop & docker-compose.
From what I read it sounds like you're on the right track. If you want to or need to keep you files on the NTFS disk then WSL1 is a better choice.
How do you access files in the Linux FS using the Windows explorer? Or more specifically, what is the path to the Linux FS?
For me the path looks like
\\wsl$\Ubuntu-20.04\root
when I look at it in the Windows Explorer address bar.Thanks :)
Thanks for this advice. I will need to create a React project for my bootcamp and this could make a difference for me. I'll look into how to do this right away!
Yes, I just realized the same thing, that WSL2 is a dog. And I just finished moving over from WSL1 to WSL2 on my main development box and my laptop.
A year on I haven't looked back. WSL2 is my main terminal and I'm using it productively, I haven't found a need to go to the Windows file system so it's super fast.
Having my files on the Linux FS makes absolutely no difference to the compile time. Also under Windows and adding the folder the Windows Deference exclusions makes no difference. It's sad.
Another advantage is hot-reloading actually working for react and vue; I had always had to use workarounds in win10 with WSL2