Today the Windows Subsystem for Linux (WSL) in the Microsoft Store is dropping its “Preview” label and becomes generally available with our latest release! We are also making the Store version of WSL the default for new users who run
wsl --install
and easily upgradeable by runningwsl --update
for existing users. Using the Store version of WSL allows you to get updates to WSL much faster compared to when it was a Windows component.In response to the WSL community’s requests, WSL in the Store will now also be available on Windows 10 in addition to Windows 11. So, Windows 10 users will also be able to enjoy all of the latest features for WSL including systemd and Linux GUI app support!
I obviously have no hard data on this, but I feel like WSL is actually quite popular among developers, as it gives Windows users easy access to a very popular tool chain and development platform. I don’t know just how transferable knowledge and experience gained through WSL is to “real” Linux, but it seems close enough.
It is pretty much close to vanilla Ubuntu. Of course, hardware setup, X11/Wayland/XDM and other parts are missing. But desktop applications, network services, and program development should be more or less the same.
Au contraire mon frère, X11 and Wayland works quire well. For Xorg, Windows just needs an X server – I use VcXsrv, but there are others. And Microsoft built a Wayland compositor for WSL that launces Wayland programs alongside Windows programs.
And, not just Ubuntu, but also Debian, OpenSUSE (Tumleweed and Leap), and a couple others are available from the Microsoft store, but there are other distributions available at other places.
Drumhellar,
I think there is a misunderstanding.
I was talking about hardware configuration of X11/Wayland. Like nvidia drivers and such. Not having driver problems is a great win for a Linux installation. And given login is also handled by Windows, xDM is also not needed.
Too bad that filesystem access between WSL2 and the Windows host is still prohibitively slow. Working on native files from within Linux is not just a bit sluggish, we’re talking 10 times slower.
Tuxie,
Yeah, to me one of the main benefits of using WSL is having windows and linux apps sharing the same file system. In WSL2 this still works from the VM to host over 9p. But when I measured the performance recently the performance takes a serious nosedive.
https://www.osnews.com/story/135483/windows-11-powertoy-now-lets-you-find-out-which-processes-are-using-the-file/#comment-10426777
https://postimg.cc/n9cjgH97
With WSL2 you pretty much have to work off a virtual disk, but at that point you loose the benefits of a shared file system. At that point I’m asking myself what are the benefits of WSL2 over virtualbox. Virtualbox, unlike WSL2, has no artificial restrictions on the kernels you can run in the VM. And since I build my own distribution this is something that I value.
Alfman,
Are there no benefits of WSL over VirtualBox?
From the top of my head, I think it can do:
– Direct integration with Windows Console, and even the command line “wsl ls”
– GUI integration (though same can be done using an X11 server under Windows, like MobaXterm)
– VSCode, and Visual Studio integration
Basically much closer to native Windows experience.
sukru,
Does that provide significant benefit over regular rsh/ssh, which works with local VMs, remote VMs, and physical machines? I’m not a WSL user, so maybe it’s more useful than I realize, but if you’re already comfortable using remote shells, what is the advantage here?
That’s true. Now that we’re chopping the head off X11 and don’t have network support with wayland, this might be an advantage going forward. On the other hand, at least for me, almost everything I do remotely uses the console for access rather than the GUI. I am drawing blanks trying to think of linux GUI software that I couldn’t find a native replacement for on windows.
I’ve never used them together, so I can’t say anything about this integration. However as someone who doesn’t like Visual Studio for C development, I’m rather doubtful that I’d want to use visual studio for linux projects. I actually thought visual basic and .net were good, at least for what they were. But I find the microsoft tooling for C/C++ can be very rough around the edges. Anyway I have to shake it off before I get into a long rant, haha.
Alfman,
Then you might not be the target audience for WSL, as you are already set for Linux.
That being said, Visual Studio is actually pretty good for C development. Or maybe I should say vscode. Add in git/hg, clangd and VIM supports, and it becomes a very capable system.
https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd
sukru,
Fair point.
IMHO it’s got too many quality issues. It’s slow, buggy, every upgrade we have to worry about library backwards compatibility. Sometimes the debugger is not able to see all variables and debug mode does not fix it. Sometimes the IDE and compiler don’t agree about what code is in scope. It makes you pull your hair out when the IDE shows something is disabled by ifdefs, but the compiler compiles it into the code. An intern showed me that one and we lost time because we wrongly assumed VS was giving us good information. In one project there’s a known bug where VS refuses to display the resource files correctly unless we edit a seemingly unrelated system file. Build and rebuild don’t always make the same code. There was that time when several developer’s enterprise VS licenses erroneously became unregistered after windows updates, search around this happens more often than it should.
Not for nothing but I’ve used VS in the past for VB & .net, and I didn’t have these problems. The C/C++ side of things just doesn’t have the same polish and attention to detail. I bet Microsoft had a lot more trouble supporting C/C++ given how the syntax tree can’t trivially be parsed locally without having to parse every template, macro, and include file above it (Sometimes vim has trouble parsing C/C++ also). Our code base is pretty large and many developers have come and gone. VS probably works better with smaller projects with more consistent practices and avoiding a complex mishmash of dependencies.
Bah, I warned you about a rant, haha.
I agree with you git integration works fairly well
cssh is the big one I use that is not properly available on windows. wsl2 still has god awful performance. File operations being the main one. It is so slow that doing ‘git pull;git push’ so that it shouldn’t have any merge conflicts is still slow enough that I will randomly have them at work.
Been forced to use it for quite a while, and it really is terrible. Current other option for me is to go back to using a mac, which I hate for other reasons…
Alfman,
I assume you are using regular Visual Studio, not vscode. And also IntelliSense from Microsoft, not clang’s clangd, which runs as a separate service. (It can even be utilized from VIM via YCM (https://github.com/ycm-core/YouCompleteMe).
Yes, then it is still left in the 1990s.
leech,
Are you using the local Linux drive, or the Windows one?
For example, while testing with the Postgres git repo (for random example with about a million items, and 750k+ deltas):
Local Linux drive (WSL2 emulated)
On the Windows C: drive
(There is a significant network difference, so that should be discounted).
According to systime, which should represent the I/O portion, using C: drive on WSL is really slow, while the local one is very much acceptable.
Unfortunately, enabling the VM Platform, which is necessary for WSL as well as Android on Windows, prohibits the use of hybrid sleep. I don’t know what Microsoft was thinking here, but forcing users (without their knowledge, even) to choose between long battery life and the Linux subsystem use is crap, especially now that they’re targeting Android apps at end-consumers and not just developers who probably have their laptops plugged in all the time anyway.
Drilling in to the info reveals this tidbit…
Increased file IO performance
File intensive operations like git clone, npm install, apt update, apt upgrade, and more are all noticeably faster with WSL 2.
The actual speed increase will depend on which app you’re running and how it is interacting with the file system. Initial versions of WSL 2 run up to 20x faster compared to WSL 1 when unpacking a zipped tarball, and around 2-5x faster when using git clone, npm install and cmake on various projects.
Drunkula,
Have you tested this yourself though? Have a look at the links in my first post, I benchmark the performance using “fio” and on my computer the IO performance of a clean WSL2 install only managed to beat WSL1 when the OS when A/V scanning was enabled for the NTFS drive. When this was turned off WSL1+NTFS actually performed 12% faster than WSL2+ext4.
malxau suggested that metadata heavy operations may be slower on NTFS, which is something fio doesn’t test for. Has anyone else tested this or know of another benchmark that tests this? Maybe I’ll try to build the linux kernel as a benchmark Anyway just be careful taking WSL2 performance claims at face value and know that the A/V scanner being on makes a big impact.
MSYS2 is all I need, but my needs are very moderate because I mainly run Linux on my desktop PC. A Linux Subsystem for Windows, now _that_ would be fun (WINE comes close though, and NTFS support is in the kernel).
I admit that Microsoft did a good job here. Good integration. It also shows the power of virtual machines on the desktop. The same tricks could be employed for Android, Mac OS, and whatnot. Meaning the OS wars on the desktop become blurry.
So 2023 will become the year of the Linux desktop, running on Microsoft Windows
Fake news. It still complains “too old winver” on Windows 10 after reinstalling the app, also tried yesterday.