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.
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.
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.
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.
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.
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.
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.
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.
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)
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.
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.
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?
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?
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.
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.
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.