Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I must say WSL2 has genuinely been huge for me, to the point where I've finally been able to ditch macOS for a desktop with a Ryzen CPU.

Honestly it's mindblowing how far Windows has come - if I were Apple I'd genuinely be scared of losing a large proportion of power-users as Windows becomes an increasingly viable platform for development.



I've also switched from Mac to a Ryzen desktop. So far the experience has been extremely good and performance is amazing. Been working with clojure and react native on WSL2 several months now.

I didn't want it to be this way though. Apple has been continuously pushing out laptops that are not what I want. My Mac is also notifying me nonstop about 2FA authentication and iCloud storage, and I can't seem to turn those off. I used to eagerly await their keynote events to see what cutting edge innovations they will announce. There have been none I care about since Steve passed.

The lack of a decent modern laptop (I just want a proper keyboard without touchbar, some ports, with a decent cooling system) and MacOS becoming more buggy and annoying has pushed me to find an alternative.

WSL1 did not cut it for me, but WSL2 has taken Apple out of my mind entirely with regards to my development environment.


Why do you guys even use WSL? React does not work on Windows proper? If a few command line tools is all you need - there is MSYS and Git Bash. Genuinely curious: I use it mostly for testing, as some of the software we make supports Linux.


I switched to Windows full time a few years back. I started with WSL1, but ran into some serious bugs (that have since been fixed) and made the full jump fairly quickly.

I think a lot of folks take this path because it's just easier. The fact that I know I can do most of the stuff the same way I always have makes it an easier decision to make. I think there's also, for some people, an ideological component, that is, they're still using UNIX, it just happens to be in a Windows host, and that's easier to accept than come to terms with Windows just being a decent OS on its own merits. (I am not saying anyone in particular in this thread is that kind of person, of course.)


If you deploy / admin linux on production side it just seems to be a lot easier to also basically develop in a linux like environment.

With WSL2 you can go from - I wonder if this would work, do a quick no git checkin no vm no docker quick script, then looks good, let's drop this into git, get a dockerfile going, test on docker then test deploy or start going to production.

And it's all pretty fictionless and you can use your Windows machine still for whatever other desktop stuff you have (which many find easier than getting a linux desktop going especially if you need to interop with a word / excel / microsoft business).

I think Microsoft is finally paying a bit of attention to what developers are looking for. The vagrant / docker on windows solutions were in part providing for this need (windows desktop / linux development). This is also what made MacOS so great (unix/bsd under the hood with a nice gui). Why not bake it in? Linux is open source - you don't even have to license it from someone.


I develop multi-platform C and C++ code (intermingled with some python for testing and automation), and my experience has been that while MSYS + Git Bash works, I run into 'rough edges' on that side much more frequently than on the WSL side.


Those of us who have been using Linux around the the year 2000 will remember the April fool joke on Slashdot about running Linux alongside Windows. The often repeated mantra, first they ignore you, then they laugh at you, then they fight you and then you win. The main reason of this seamless integration happening between Linux and Windows is most probably the fact that developers or the "cool kids" going to MacOS by the droves. Like what people normally say, the enemy of your enemy is your friend. Only time will tell how many of the "developers" will come to Windows via the unthinkable Linux route, but correctly done Windows and Linux integration is a potent OS combination.



Back in those days, if Microsoft had seriously invested in the POSIX subsystem, I would never bothered again with Linux.

We were deploying into production with Windows, Aix, HP-UX and Solaris.

The Red-Hat Linux server that we had around was only for test purposes.


I'm not sure about that. I've been running Linux as my daily driver for a good 20 years now (minus a few years on macOS when I foolishly bought some Mac hardware too poorly-supported by Linux to be usable). I finally gave up on Mac hardware last year and bought a Dell XPS 13. I went through the Win10 setup so I could easily shrink the Windows partition and install Debian in the remaining space.

It frankly disturbed the hell out of me. Windows asked for consent (default to yes, of course) for a lot of invasive things, to the point that I wondered what it was going to do without asking. And even after I said no to them, I saw what I can only describe as ads all over Windows itself. Windows pushing me to use Edge, Windows pimping Cortana even when I said I didn't want to use it, etc. In the hour or so that I used it, I never wanted to use it ever again (and, indeed, I haven't).

Apple and macOS certainly have issues of their own, but I never felt like Apple was trying to advertise to me or violate my privacy. Microsoft made it very clear that they ravenously wanted to do both to me immediately. I'll stick with Debian, thanks.


Windows can be controlled entirely by the keyboard, out of the box (Start+ArrowKey).

MacOS always required extra setup with Karabiner and other tools to mostly accomplish the same thing.

The BSD derived base in MacOS made a great developer OS but the windowing system often felt lacking.


macOS has full keyboard access and you don’t need Karabiner to enable it.


It's my understanding that MacOS requires extra setup for those shortcuts regardless of Karabiner.

If you feel that extra setup is acceptable then any almost modern OS will fit your needs. There's something to be said for standardized shortcuts that work on every MS Windows instance.


All you need to do is enable full keyboard access in System Preferences -> Accessibility and it'll work.


Which keyboard combination moves windows around, the same as WIN+ArrowKey, after enabling "keyboard access" in MacOS?


Apple lost the development train a few years ago.

Windows + Linux VM has been a better platform for a long time, even before WSL!

Microsoft recognized this and wanted to boost this workflow by providing it themselves.


I really like WSL. And Windows 10, well, it's not awful. I don't hate it anymore than I hate Mac OS's GUI. I find things especially nice with the new Windows Terminal.

But the piece missing is still first class support for X (or Wayland) Linux applications. Without GUI Emacs, for example, or some way of integrating the Windows Emacs well, I find the WSL experience not as productive as booting into my actual Linux partition. But it's like... 90% there.

One thing I really like is that the Windows version of CLion will use SSH to connect into your WSL installation and use the Linux toolchain. So you can develop both Linux and Windows applications using the CLion GUI IDE on Windows, it's quite seamless.


> One thing I really like is that the Windows version of CLion will use SSH to connect into your WSL installation and use the Linux toolchain. So you can develop both Linux and Windows applications using the CLion GUI IDE on Windows, it's quite seamless.

Tramp[1] does this for Emacs. You can run Windows GUI Emacs and use SSH or another protocol to edit files and run commands within the WSL installation. It's pretty seamless.

[1] https://www.gnu.org/software/emacs/manual/html_node/tramp/in...


that's awesome! thanks


The one (big) caveat is that some Emacs commands that start subprocesses will incorrectly try to start the process in your local environment (in this case, on the Windows side), rather than the remote environment (within the WSL VM). This mainly occurs when elisp functions are implemented using call-process or make-process when they should use process-file[1] or start-file-process[2].

This isn't an issue for most code within Emacs itself, but it pops up occasionally when using packages from ELPA or MELPA.

[1] https://www.gnu.org/software/emacs/manual/html_mono/elisp.ht...

[2] https://www.gnu.org/software/emacs/manual/html_mono/elisp.ht...


You can run emacs on WSL and just pass the X output to windows using an X server like VcXsrv. This works pretty seamless for me, no noticeable lag or anything.


This works very well. Another thing I do that works well, and I don't really see it brought up anywhere, is to use nomachine to connect to localhost. It's not seamless in the sense that you have linux apps side-by-side with native windows, but it gives you a full linux desktop experience (you need to install a linux desktop and wm in wsl for this to work well). Combining this with windows virtual desktop i can flip back and forth between windows and linux instantly without any vm.


Have you tried using Emacs with an X server for Windows?


Yes... it's not as well integrated as I'd like.


Why use WSL2 instead of just running linux directly? Why do you need Windows in there?


A huge number of things are terribly supported on Linux. Just as much better linux generally is for software dev, it's that same amount worse for most else. When I last tried going full linux (admittedly over five years ago), I remember wifi being a nightmare. Netflix had issues I can't remember specifically. Even ubiquitous formats like pdfs and word docs wouldn't always work correctly. More recently, I remember spotify being a pain and youtube not working as well. Maybe it's better now, but support for new mainstream products always lags in linux.

It's why so many of us try to get the best of both worlds. Dual booting with mainstream OS and linux, or ssh'ing from a mainstream OS to a machine on linux, using OSX + unix terminal, or windows + unix terminal, both options together always seems better than either option alone.

Kinda like how you could do anything in C++ that you can in Python, and vice versa. But the ecosystem is often what determines the best choice. Sticking with one and only one limits you.


to play windows games or run windows applications that don't work in wine or in a windows virtual machine.

to comply with company policy that only supports windows on desktops.


A lot of software (drivers, engineering suites, Visual Studio, games...) requires Windows or is better supported there or easier to work with.

Others prefer the Windows desktop, in particular for multi-screen.


Video games. Though I've finally got a second GPU and am working on passthrough from Linux to a Windows VM.


I've solved this problem to myself by having a dedicated Wintendo.


drivers.


How does it compare to real Linux distributions? Does it have a package manager? Is it like Debian? What are the limitations?


It sounds fancy but it's just a VM with a bit more polished Windows integration.


Hm, okay. That doesn't sound impressive anymore.


No, but the good news is you can literally run Arch, Debian and Fedora on the same machine with shared files.


You could already do that with WSL1.

Source: I have Arch and Ubuntu on WSL1.

Those didn't change. Other things did.


WSL1 managed to corrupt SQLite dbs. Which is really annoying, and does not happen with WSL2.

My (casual, not work) use relies heavily on Nix, which is built around a centralized SQLite file. I did not enjoy that experience.


Thanks for that, I have hit this bug once with WSL1 in the past and didn't think much of it at the time. Good to know what caused the issue.


Wow, that's amazing/terrible. Would you have a link to a repro?


I think this is the relevant bug: https://github.com/Microsoft/WSL/issues/2395

WSL2 has been great so far (I’ve been using it for a few months now with no serious issues).


Thanks!


Thanks, this perfectly explains a weird error I have been seeing!


They didn't say that something changed.

But I'm intrigued, what did change?


WSL2 uses a VM while WSL1 uses a Linux like interface over a system-call DLL.


WSL2 sounds like a step back.


Their other choice was to make Windows file IO actually fast.

That just wasn't going to happen.


I/O performance characteristics changed, your ability to share the same filesystem for both OSes changed, etc.


That sounds good.

How does it handle case-sensitivity?


WSL gives you a full Linux distro. You can use Debian, Fedora, Ubuntu, from the top of my head. These are default options. There are others available. Additionally, you can bootstrap to other distros. I know Arch was an early target.

WSL1 replaced the init process. For Ubuntu, at least, snaps were not enabled, at least out of the box. There were occasional issues early on where the syscall translation was not perfect. For me, at least, these were all ironed out after a few revisions. Unsure if there were still edges I didn't hit.

WSL2 takes advantage of virtualization technology, so should be an even better Linux experience.


There were 4 "standard" distros in the Microsoft store IIRC


Just double checked in a Windows VM. These are available when searching WSL in the Microsoft Store. Some of these are for a fee. There are also a few results for terminal emulators and an X server.

- Ubuntu (18.04 and 20.04)

- Kali

- Debian

- Fedora (remix for WSL)

- openSUSE-Leap-15

- SUSE Linux Enterprise

- Alpine

- Pengwin (Debian-based and apparently optimized for WSL, and an enterprise version)

- Centos (7 and 8.1)

-


It is a real Debian (or, by default, Ubuntu). Original packages from Debian's servers are used. You're using apt, as usual.


You can run various Debian distros. It works like it should. You can run an x server and get a GUI as well.


It is an actual linux distribution. The default is Ubuntu but there are others (Suse, Alpine...)


WSL2 is a full blown emulator / virtualization solution, so it runs a real linux kernel / distribution. The largest downside to me is no gpu passthrough from the host.


They say GPU passthrough is on the backlog in their post build FAQ. https://devblogs.microsoft.com/commandline/wsl-2-post-build-...


I've been tracking that. Almost certainly AMD exclusive since, AFAIK, NVIDIA prohibits GPU passthrough on their consumer cards so VPNs are forced into purchasing 'professional' grade GPUs.


You can even compile your own custom kernel for it. I've had to do so in order to run some modules that the WSL 2 kernel currently doesn't have.


I'm using full ubuntu in it. The only real pain is anything that relies on systemd (which comes up unsurprisingly often).


Systemd is not working.


The Mac is 10% of Apple’s revenue. How much of that 10% do you really think are developers that would switch just because Microsoft supports Linux? Especially considering that macOS is a real certified Unix not just tacked on.


How many developers care about "certified Unix", or can even say exactly what that means? Is anyone buying Macintosh computers in order to run their certified Unix software?

Linux isn't certified, and none of developers using that seem to mind. If Microsoft got WSL "certified", would any Linux user consider it a better Linux than Linux?


Actually there are Linux distributions that are UNIX certified, namely Inspur K-UX and EulerOS 2.0.

https://www.opengroup.org/openbrand/register/brand3617.htm

https://www.opengroup.org/openbrand/register/brand3622.htm


None.

The point is how many people care about running Linux in a VM (which is all WSL2 is) on Windows instead of running a native Unix operating system? Out of those that do care about running Linux, what is the practical difference between running Linux in a VM on Windows and Linux on a VM on Macs?


Apple doesn’t put time and effort into making Linux on a VM feel at home on macOS.


It doesn’t have to. How does WSL feel “more at home” than the third party VM solutions available for Macs?


There are tail wagging the dog incentives here.

Part (not all) of the Mac resurgence was that you needed a Mac to develop iPhone apps.

Part (not all) of the new Windows resurgence is that if you even really want to play around with ML or VR dev you need a Windows machine.

I feel like it's about the possibilities - with WSL, Windows Terminal I get what's essentially the mac experience but can suddenly do so much more.


The Mac’s “resurgence” started around 1999 with the introduction of the iMac - 9 years before the App Store opened. Apple currently sells around 16-20 million Macs a year.

No matter how good WSL is, if you want to develop iOS apps, you still have to buy a Mac.

There are around 200 million consumer PCs sold a year. Do you really think any significant number or sold to develop VR apps - that market is minis use.


They resurged because windows laptops was straight trash and wireless worked like shit. Apple only needed to do a few things better back then.


> Part (not all) of the new Windows resurgence is that if you even really want to play around with ML...

Do you mean machine learning? If so, then that doesn't match my experience at all.


What makes windows better than osx for VR?


Well, one of the biggest platforms for VR gaming has dropped support for Mac OS.

https://www.theverge.com/2020/5/1/21244468/steam-mac-support...

Coupled with a history of GPU driver support usually being best on Windows and having good GPU support is usually pretty important for VR, its pretty clear why Windows is probably the best platform for VR development at the moment.


To put this in perspective, less than 2% of Steam users have a VR headset. It isn’t exactly a huge market.

https://www.engadget.com/half-life-alyx-adds-1-million-vr-us...


Most of the VR platforms just aren't supporting Mac b/c of the smaller playerbase, lack of higher end video card support and games support.


Better experience you will have using native linux, insterd of a glorified VM.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: