Live data from Hacker News

Windows Subsystem for Linux 2 Moving into General Availability

infoq.com

381–390 of 420 posts

Re: Windows Subsystem for Linux 2 Moving into General Availability

#381
post #10

Is there a shell+terminal+font combo that folks really like for WSL? I've tried the new terminal beta with zsh and--for reasons I can't quite articulate right now--it feels "off" and I invariably proceed to boot up virtualbox for my debian, i3, kitty, fira code setup to get work done. Maybe it's the break in filesystems and $HOME? Edit: learning that WSL2 does away with the syscall-translating tech and mandates Hyper…

I've been using cmder with Consolas for years now, and I love it.

It supports tab, and is very configurable (thankfully there is a search box in the settings dialog!)

Can't recommend it enough.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#382
post #96
post #67

Earlier quoted context omitted.

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.

Well, if you want to use multimedia and do web development on the same machine, what are you going to do? Linux support is somewhere between nonexistent and utterly broken for the first one and the same can be said for the second on Windows. So your choices are, 1. run Linux primary, put Windows in a VM 2. run Windows primary and put Linux in a VM 3. Give up and just run a separate Linux server.

I've never had any issues doing web development work on Windows

Re: Windows Subsystem for Linux 2 Moving into General Availability

#383

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…

Tip: you get great performance by just installing and running Linux directly.

Yeah I really don't get the desire to do unixey development on Windows. Boot up a VM and SSH into it, if you really must have Windows. It's not like you have to buy a license to use Linux. I keep struggling to understand what WSL brings to Windows. First it was a totally incomplete distro, and now it's just a fucking VM. Seems like a gimmick more than anything.

Virtualbox, HyperV, etc will all allow you to access your Windows files on the guest OS. If that doesn't work, just set up an SMB share and map it. Why all the complication? Does clicking one button to install a distro really serve anybody? Why do you want to use the fucking awful Windows Update mechanism to update your kernel? Updating the kernel in Linux is so fast and easy...

You learn so much more about Linux by running Linux. Why are we trying to abstract that away? I think it's Microsoft's desperation to keep devs from continuing to jump to MacOS and Linux.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#384
post #338

Earlier quoted context omitted.

Sorry, should have made my point more clear. VSCode made some unique design choices which enable them to support connecting to any Linux server, VM or not. In contrast, these design choices may not be possible for other IDEs. So, because WSL 2 is, effectively, a Linux VM, supporting it in editor is harder than supporting WSL 1. As for "I really don't get" part, I wanted to say that WSL 2 sounds like a regression to m…

Nit: WSL2 is available on Windows Home, while Hyper-V is reserved for Pro and up.

Solution: Any other virtualization platform.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#385

Earlier quoted context omitted.

I found a way to run Windows from scratch and have Hyper-V enabled. Just install rEFInd boot manager and use 'enable_and_lock_vmx true' in the config.

Hi, any article on the subject I could read? This is the first time I hear of rEFInd.

This is a good article:

https://dea.nbird.com.au/2017/02/24/enabling-vt-x-on-mac-boo...

Re: Windows Subsystem for Linux 2 Moving into General Availability

#386
post #380
post #250

Earlier quoted context omitted.

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 wors…

Much of the performance problem comes from layers on top of NTFS itself- it's not just the virus scanner. Ext4 might be faster but I doubt it would be enough to ditch WSL2 for those use cases that need it.

Also, some of the "performance problems" are simply different access models. Windows and NTFS tries to provide some database-like ACID characteristics, including transactions at the level of batches of file updates with commit/rollback support. Ext4 and Linux (intentionally) make few such guarantees and so it shouldn't be surprising have very different performance profiles, just as you might expect between a NoSQL database that makes no ACID guarantees and an SQL database with multiple types of locks and several types of transaction behaviors.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#387
post #247

Earlier quoted context omitted.

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.

WSL 1 also supports the 9p file server and \\wsl$, you just have to upgrade to at least Windows 10 1903.

(Also, hints are that Microsoft is exploring adding shortcuts to \\wsl$ directly to the File Explorer left hand tree.)

Re: Windows Subsystem for Linux 2 Moving into General Availability

#388

Earlier quoted context omitted.

You can convert WSL2 to WSL1! There's an argument to wsl.exe you can use to go back. Do it, free yourself (and your kernel)

I feel like they don't advertise this enough. I was under the impression that it's a one way street from wsl1 to wsl2. Since wsl2 is not strictly better than wsl1, it's nice to be able to convert and pick the trade-offs you want.

Yeah, the mistake of using numbers instead of names gives the impression that 2 is strictly better than 1 and that migrations are unidirectional upgrades.

Even just letters like WSL-A and WSL-B might have given a better impression.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#389
post #10

Is there a shell+terminal+font combo that folks really like for WSL? I've tried the new terminal beta with zsh and--for reasons I can't quite articulate right now--it feels "off" and I invariably proceed to boot up virtualbox for my debian, i3, kitty, fira code setup to get work done. Maybe it's the break in filesystems and $HOME? Edit: learning that WSL2 does away with the syscall-translating tech and mandates Hyper…

I use Cmdr (with solarized theme and Consolas font) with Zsh and Oh My Zsh (with agnoster theme), but it is really a matter of taste.

Another happy cmder and Consolas user here! Never used Zsh tho - what benefits does it have?

Re: Windows Subsystem for Linux 2 Moving into General Availability

#390

Earlier quoted context omitted.

Go to \\wsl$\ and it mounts the WSL instances as network drives.

So the idea is that you put all your work in that network drive and then open it across the network from your IDEs and Explorer etc? I mean, not hating it, but that doesn't feel all too straightforward, definitely less sonthab wsl1 :/

It's not a network path, it's a pseudo-device. Windows uses the \\ UNC file paths for a lot more things under the hood than just network access. There's a bunch of rare device file paths that you'll get UNC paths for, and every folder path canonicalizes to at least one UNC path for multiple reasons.

Though it is powering that pseudo-device by a 9p-based file server under the hood, it's not a network accessible path, it's only available to the local system.

The trade-off between WSL1 and WSL2 (and you can have both on the same system and migrate distros both directions between the two) is mostly how often and where do you expect to need to deal with the 9p file server between your operations. In both versions Windows needs to use the 9p server to access Linux files, in WSL2 Linux also needs the 9p server to access Windows files.

Post reply on HN