What is a developer scenario where it would be more productive/efficient using WSL2 rather than vanilla Win10 ?
For further actions, you may consider blocking this person and/or reporting abuse
What is a developer scenario where it would be more productive/efficient using WSL2 rather than vanilla Win10 ?
For further actions, you may consider blocking this person and/or reporting abuse
Gnanee.io -
Jonathan Fishner -
Argho Dev -
Sukhpinder Singh -
Top comments (6)
Pretty much anything that requires Linux.
Sure, you could fire up Hyper-V and install a VM, but who wants to do that?
I've been working with WSL 1 for a few years now and can't wait for WSL2 to go GA.
I can't go without it anymore.
Most of the time, I need windows for some stupid business-apps that don't seem to know linux even exists or that cross-compiling is a thing.
But I do prefer to develop on linux, since the cli is so much faster than any shiny UI and their stupidly long mouse-paths.
Not to mention that most tools on linux simply work better/faster/more reliably.
So I guess it's for weirdos like me, that don't want to dual-boot/waste resources for VMs, must have most of both worlds on hand at any time and somehow want to shoehorn linux into their windows-workflow.
Or in short, people that actually want a fully fledged Linux, but are bound to windows for any stupid reason :D
Agree! One of the top reasons is performance - a
npm install
on a typical fronted app will be at least twice as fast on Linux. See my article on WSL 2 on some reasons and how to setup a dev environmentThanks, I was not thinking about cross-compiling, that's a good point.
It's not even just cross-compiling. I use WSL1 semi-regularly just for the ability to use sensible command-line tools when working with text files. There are no easy to use equivalents to
grep
orsed
on Windows unless you're dealing with a full-fledged IDE, and quite often that's well beyond overkill for what I'm doing.On a slightly separate note though, Docker for Windows is pivoting to utilize WSL2 instead of a custom VM as the environment for running containers so that it can leverage a number of the features WSL2 provides (like dynamic memory allocation) to improve upon the ability to run Linux containers on Windows.
Thanks Austin.
Actually gitbash on windows has all the common linux commands like grep or sed or awk, etc and with just 5 minutes tweaks its terminal can be more than decent and you can add it to the new windows terminal.
Docker and WSL2 are now working well together but I experienced some hiccups with vscode integration.
What kind of containers are you normally deploying for your dev workflow ?
While true, it's still less flexible than WSL in that you can run most distros in WSL and have access to almost all of the packages in their repositories. That level of flexibility is huge in some cases when compared to the Git for Windows environment.
Well, it is still listed as experimental last I saw. I can't comment on VSCode integration though as I just don't use VSCode (I much prefer Vim).
Directly in Docker for Windows? None actually. All of the stuff I do with any regularity development-wise needs a Linux environment to work from (in almost all cases, I'm using Docker for a reproducible build environment and nothing more, and my build systems are generally Linux dependent). On the rare occasions I can't reboot into Linux on my laptop to work on such things, I use WSL and run any containers I need to run on my home-server system.