Live data from Hacker News

Windows Subsystem for Linux 2 Moving into General Availability

infoq.com

241–250 of 420 posts

Re: Windows Subsystem for Linux 2 Moving into General Availability

#241

Earlier quoted context omitted.

You can access files on the Linux file system from Windows.

Has that changed from wsl 1? I've seen bad things about directly trying to modify the files within wsl. It's not the appdata folder right?

Microsoft is even integrating seamless access shortcuts to the WSL filesystems as top level citizens within File Explorer[1].

https://www.theverge.com/2020/4/8/21213783/microsoft-windows...

Re: Windows Subsystem for Linux 2 Moving into General Availability

#243
post #187

Earlier quoted context omitted.

why not use git natively? I've never understood why people use git in WSL since the IO performance isn't great

Unfortunately Git on Windows is also extremely slow. Especially using Magit in emacs, which does a lot of git calls, works much, much faster for me if it's sshing to a Linux VM for each call then running natively on Windows.

That may have been the case in the past, but Microsoft put some effort into making Git faster in Windows.

Also, remember to disable the antivirus for your Git folder!

Re: Windows Subsystem for Linux 2 Moving into General Availability

#244

Earlier quoted context omitted.

What do you propose if you want to use a windows program to edit those files? For example I use intellij on Windows but want to compile and test on the Linux machine. If it takes 30 seconds longer than wsl 1, why would I bother changing? What is the actual point of wsl if not for the cross compatible filesystems

That's not my experience with VS Code on WSL 2. I have been using it for months using the remote extension, hosting my git repos in the Ubuntu subsystem, it works like a charm and feels very responsive. Maybe wait for an IDE update that handles properly WSL 2?

> using the remote extension

Then there is no WSL 2 handling in your editor. VSCode remote extension works in the same way for either WSL 2, or a full-fledged Linux VM, or even a remote Linux server.

As someone who run a Linux VM side by side all times, I really don't get WSL 2.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#246

Earlier quoted context omitted.

You can access files on the Linux file system from Windows.

Has that changed from wsl 1? I've seen bad things about directly trying to modify the files within wsl. It's not the appdata folder right?

Since version 1903, the proper way to access Linux files for writing is to invoke explorer.exe from within WSL. A transparent 9P mount is created for the working directory and files are made accessible through a regular Explorer window.

https://devblogs.microsoft.com/commandline/whats-new-for-wsl...

Re: Windows Subsystem for Linux 2 Moving into General Availability

#247

Earlier quoted context omitted.

You can access files on the Linux file system from Windows.

Has that changed from wsl 1? I've seen bad things about directly trying to modify the files within wsl. It's not the appdata folder right?

This has been changed. WSL 2 VM now runs a 9p file server, and on the Windows side it mounts to \\wsl$. Of course, the performance are degraded. It would certainly take longer for Intellij to index your project.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#248

Earlier quoted context omitted.

WSL2 is really not designed for using Linux tools on your NTFS-based filesystem. Store everything on the WSL filesystem, that works perfectly. If you need GUI tools try VcXsrv.

What do you propose if you want to use a windows program to edit those files? For example I use intellij on Windows but want to compile and test on the Linux machine. If it takes 30 seconds longer than wsl 1, why would I bother changing? What is the actual point of wsl if not for the cross compatible filesystems

For wsl2, Vscode has integrations that let you do exactly that. I use python primarily and it lets you use the python interpreter installed on wsl. I assume other IDEs would have something similar or at least let you develop using a remote machine, but in this case you would configure it to point at your VM instead.

As long as your processes and files are from the wsl vm, it is extremely fast. I rather use the wsl shell, so all of my files are in the vm.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#249
post #67
post #59

I am giving up. WSL1 was a great invention but Microsoft gave up on it, either because of the filesystem performance problems or because of the debuggers. https://github.com/microsoft/WSL/issues/2028 (lldb, rr, delve all affected). This looks like a dreaded case of the first 90% is easy, it's the second 90% that is hard. Imagine implementing a translator for a vast majority of Linux syscalls just to find certain flav…

WSL was very cool from a pure tech standpoint, but I've never been clear what the actual use case for it was. WSL2 seems to be more along the lines of coLinux, which I felt the same way about when it was new.

Same use case as Wine does on Linux. It doesn't have to be perfect to be useful.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#250

In WSL1, running "wsl git status" on a moderately sized repo on an NTFS (Windows side) drive or SMB file share is nearly instantaneous. In WSL2, running the same command takes over 30 seconds. WSL2 is a massive hit to the seemless experience between the two operating systems with filesystem performance from Linux to Windows files orders of magnitude worse. Yes, unzipping tarballs or manipulating and stat syscalls are…

Clearly the best solution is for Microsoft to (a) write a proper ext4 driver for Windows and (b) find some way of embedding SIDs into ext4, then you could just format the drive as ext4, boot off it, and have the improved performance.

(This is mostly a joke, but the performance of NTFS for certain operations has always been abysmal, and having a virus scanner injecting itself into all the operations only makes it worse.)

Post reply on HN