37 comments

[ 12.0 ms ] story [ 854 ms ] thread
What is WSL2?
The second iteration of "Windows Subsystem for Linux".

Basically it lets you run Linux within Windows and it is implemented by Microsoft:

https://docs.microsoft.com/en-us/windows/wsl/about

WSL1 was a Linux syscall translation layer that tried to emulate Linux.

WSL2 is actually a Linux kernel running as a Windows subsystem via containerization magic.

Not really containerization, but virtualization.
Additionally, WSL was born from the ashes of Project Astoria, which goal was to bring Android into Windows Store.

Now with Windows 11 they seem to be having another go at it.

So Windows 10 with WSL2 is the best Linux Distribution?

At least it has a sane desktop. I'll take that over a bare metal install of a Linux distro, such that I don't need to dual boot my machine.

If you call windows 10 desktop sane .... Even TWM looks better. I do not know who had the great idea to redesign the start menu but i had a collegue spend 5 minutes to find a program in it. To MS defence 2 minutes were spent typing the name of the program, checking spelling errors etc. Finding Office programs is the same. Is it Word at W or at M (microsoft word). It seems now it's below MS office. MS saw that something is wrong and they created shortcut tiles. Yes, linux DEs (GNOME and KDE) are a mess because as the OP said they do a rewrite every couple of years turning away users and this is mostly the reason why the desktop linux never took off. WSL is mostly MSs answer to the issue "we need linux to do development because MS lacks the needed tools". WSL is also a way to steal linux developers.
The start menu is far from usable, but Classic Shell is the first thing I install on a new Windows 10 machine (which gets rid of it). The remainder of the UI, such as the taskbar and the window management are light-years ahead of Linux. The closest thing I could find to replicate this in the Linux ecosystem is KDE, but even that sucks and is very buggy.
I find window management in fvwm light years ahead of windows. Working with virtual desktops in windows 10 is a PITA. The idea to fill the title bar with all kind of search bars, buttons (why do i need Save in titlebar when i have the same thing in the ribbon ?) is terrible. I cannot double click to maximize a window because i will hit a search or save button or ribbon button. Resizing windows in win 10 ? They made the border so thin that it is a lotery to grab it with a normal mouse on a HD monitor. But, ymmv.
The window decorations changes in Windows 10 are indeed horrible. I hope there's a special place in Hell for those that forced 'ribbons' onto the UI.
I prefer ribbons to the old-style menus in office suites. But they still could be better - I often need to switch between three tabs to perform certain actions.
Ribbons were actually introduced into the OS on Windows 7, after their appearance on Office.

The Hilo sample for introduction to programming in C++ makes use of the Ribbon.

I don't like virtual desktops much, so I don't use them. But I agree that stuffing many functions into the title bar hurts the UX. IMO, Office 2010 got it right - mostly a plain title bar, with a few (!) quick launch buttons customisable by the user.
So he doesn't know how to use search on the menu?
GNU/NT (WSL1) is the best operating system.
Not really. Windows 11 just turned into the most elaborate linux bootloader in history. It has a Wayland compositor now, so even the graphical stuff installs and runs. Windows 11 is basically grub with its own app store.
I would say it's the opposite. In most ways WSL was better than WSL2, except that filesystem metadata operations in Windows are crazy slow compared to Linux.

Until people tried to port build workflows from Linux to WSL nobody noticed, people working with Windows might have known metadata operations are slow but they worked around it, they just didn't make lots of small files, probably didn't even know there was some operating system that was vastly faster.

Microsoft does a focus group with WSL users and finds that some of them are frustrated because filesystem metadata operations are slow and they got desperate; they couldn't make NTFS much faster, they couldn't make any filesystem that uses the filesystem interface in Windows much faster.

So they create WSL2 which bypasses all the filesystem stuff in Windows and goes straight to the block layer.

The trouble with WSL2 is that you might as well just install Ubuntu on top of Hyper-V or VMWare or VirtualBox and if you can do it you can install it correctly, be able to install it if your Windows Store is broken

(e.g. so many times they told me to create a new user account, give up my browser history, and reconfigure all of the programs I use every day just so I could install worthless crapplets from the Windows Store... And I'd say, you fools, there is a procedure to rebuild the database for the Windows Store and unbreak it because you do it every time there is a Feature Update, just tell me how to make it happen.)

WSL2 is inferior to VirtualBox for the same reason that OneDrive is inferior to dropbox, the Windows Store is inferior to Steam, etc. Microsoft tries too hard to take advantage of close integration and that makes them screw it up.

>they just didn't make lots of small files, probably didn't even know there was some operating system that was vastly faster

seems to be the reason many Win32 programs work faster under WINE in Linux compared to native.

There was one other drawback: Some kernel features hadn't been implemented and you e.g. couldn't run Docker containers, which now works with WSL2.

But that might have been fixed over time; in general, I find it a bit sad that the 'elegant' solution (WSL) was scrapped in favor of the 'throw containers at it' solution, but it works.

Actually it doesn’t work on my Windows install and haven’t been bothered to debug it.
It's trivial to set up if you spent just 15 minutes looking it up.

It's as simple as installing Docker in Linux (WSL2) and using your shell of choice on Windows.

Edit: the Docker instructions are pretty clear: https://docs.docker.com/desktop/windows/wsl/

(comment deleted)
(comment deleted)
I worked in a Linux shop for a while. I miss native Linux but WSL2 with VS Code is a reasonable substitute.

The only difficulty is file sharing. Especially with git repositories. Never make the mistake of managing you git repos within Windows. Good bye permissions.

Isn't this true only for WSL1 and pretty much solved with WSL2? I'm sure that haven't seen any issues. Maybe I'm wrong.
I wish it were. The files are available over something like a Samba share. So any permissions Windows doesn't support are dropped.

It's possible I don't understand and am doing something wrong.

I feel like the author is making a point that WSL is popular because existing Linux GUIs suck, and WSL provides Linux userspace in Windows GUI. I have a different idea: WSL is popular because people want to run both Windows and Linux workload without having to dual boot / maintain virtual machine, and WSL is the solution to run Linux workloads alongside Windows-only applications.
I found wsl and wsl2 to be way too limited in many aspects. By the time I accomplished what I wanted in a very hacky manner I spent like 5-6 hours messing around that would have taken me at most 30 minutes in a normal VM. All I wanted to do is run linux server software on my lan on ports Windows already uses itself and it was a royal pain.

It’s technically cool that they managed to do this but it’s not all that useful to me ultimately to get me to abandon macOS for development.

For me VMware was the wake-call, no longer needed I to care about dual booting and I made my peace with world that prefers living emulating UNIX 80's experience than something like SGI/NeXT/macOS.

Ironically I have moved away from that VMware setup a couple of years ago, don't use WSL and hardly do any GNU/Linux, only Android/Linux.

If every computer was sold with Linux/KDE and the entire ecosystem had spent the last 30 years developing and using that platform it was just be normal for everyone.

If in that world I then created a new proprietary desktop that was Windows 10 I would be dismissed as a loser by the entire industry for making a terrible unusable piece of crap.

There is nothing objectively wrong with the Linux desktop that it can't be used dby everyone.

The first sentence is probably true. The third one is objectively false:

1. Poor quality drivers. The money is not there. Intel and AMD might throw a couple of engineers on it but the process is always catching-up: slow and incomplete. Think of video, audio, power management, etc. I recently bought an AMD laptop just to discover modern standby and my jack headset are not supported, that my internal mic and speakers occasionally stop working and otherwise are too low, etc. After two kernel releases all these problems persist, even if they were acknowledged by the developers that are working on it (very resource-constrained). "Linux-ready" laptops might be a safer option but in general they are not cheap and they share most of the shortcomings listed here, it's just a safer gamble and you pay the insurance premium. Of course, if Linux had been sold OEM for 30 years with hardware vendors providing state-of-the-art drivers even before releases, this would be a different story.

2. The state of the display server. Multiple HiDPI screens with different scaling factors are not properly supported. This is an all too common requirement nowadays: FHD laptop + FHD/UHD external screen. X+xrandr is slow and buggy with most video drivers. Even after ten years, Wayland adoption is slow both by compositors and by apps. And critical functionality is missing or in alpha-state, for example screen sharing (a must have in these WFH days), be it because of the design of Wayland itself or because it depends on technologies that are still more immature (PipeWire, portals, etc).

3. Fragmentation at all levels: distribution, package manager, desktop, toolkit. From the perspective of an app developer you get a tiny market share with no clear target platform and a propensity to break backwards compatibility every now and then. This of course enables a negative feedback loop wrt to my previous points. Must read/watch from kernel developers: Molnar: http://files.catwell.info/misc/mirror/ingo-molnar-what-ails-..., Torvalds: https://www.youtube.com/watch?v=Pzl1B7nB9Kc. These problems are not unknown to Windows users (WinForms|WPF|UWP|WinUI and MSI|MSIX|exe, for example) but are way worse in Linux.

A couple thoughts…

First, WSL 3.1 will dominate. I’m only half joking here. Microsoft will iterate on this until they get enough right for their purposes.

Second is that the Linux community is great when we are building what we need - we act more like rational engineers.

But when we are building something we want , then we are much more like artists, and all have stubborn opinions about how things should be.

To me at least, it is this dual-personality that the community [0] has that is our limiting factor.

[0] - yes, I include myself in this group too for obvious reasons

> The fact that a substantial part of the FOSS community seriously prefers using what is effectively the Windows 1.01 interface with a few more features and anti-aliasing instead of any of the results of nearly a decade of UX-focused work in KDE, Gnome, or Cinnamon

suggests that the UI research was missing its market super-hard.

Users trying to get work done really hate having stuff change around from under them. One day GNOME might realise this.

I currently run Arch Linux under WSL2 for development. Project files are stored in WSL for performance, and I am using VSCode Remote WSL extension for editing. This setup is basically perfect for my use case: development and playing CTFs.

I am using WSL because I want games and Windows-only applications. Dual boot seems too inconvenient. Using a regular VM works too, but it isn't as seamless as WSL2. It can boot in seconds, sharing files with host by default, automatic memory reclaim...

>I am using WSL because I want games and Windows-only applications. Dual boot seems too inconvenient.

Depends what you play obviously compatibility wise, but proton under Linux is getting extremely good.

For a while gaming was my excuse for not switching to Linux full time, but currently everything I play I can manage to play under Linux at effectively the same or better performance. (CS:GO, Rocket League, Risk of Rain 2, FTL: Faster Than Light, osu!)

I still have a dual boot setup just in case (And a windows VM available for checking compatibility), but I've gone months without needing to boot into Windows and my tailored experience under Linux is far more efficient.

I have not been as excited as I am with wsl2 with cuda and GUI as I was when I first read about git and bitcoin.

pytorch multitasking bug in windows : squashed.

worries about sourceforge adware windows binaries of linux tools : squashed

I just setup windows 11 insider developer channel on a couple of my machines, never looking back !

I feel like I should take a 2 week vacation to celebrate the hard work of microsoft / nvidia / linux engineers on wsl2 / cuda.