DEV Community

Cover image for WSL2: Making Windows 10 the perfect dev machine!

WSL2: Making Windows 10 the perfect dev machine!

Christian Dennig on June 05, 2020

Disclaimer : I work at Microsoft. And you might think that this makes me a bit biased about the current topic. However, I was an enthusiastic MacOS...
Collapse
 
blikblum profile image
Luiz Américo • Edited

Hi, i use webpack + node to develop an client side js app on Windows, using native/win32 node version.

Is there any advantage to use webpack + node Linux version through WSL2, instead of it windows version?

Collapse
 
cdennig profile image
Christian Dennig

Hi Luiz, I don't see any advantage of this env being in WSL2. If you're happy with it, stick to it :)

Collapse
 
sunilsomarajan profile image
Sunil Somarajan

One of the biggest Issues for me is networking. Since WSL2 uses Hyper-V NAT (unlike WSL1 which bridges), it is hard to get the external LAN access WSL2. This is a pretty big deal and any info to do this would be great. And netsh portforwarding is kludgy and wont work with UDP ports.

Collapse
 
kevinhch profile image
Kevin

Hi, great post, I have a question, this WSL it's like to use linux? I mean, can you install python3 and docker and play around docker, python, installing modules like wkhtmltopdf or modiying systemd files?... like an ubuntu machine

Collapse
 
cdennig profile image
Christian Dennig

Correct...and you can even connect VS Code from Windows to the Linux environment and work on code that’s located in the Linux distro. You won’t even notice the difference.

Collapse
 
gsarig profile image
Giorgos Sarigiannidis

I was looking forward to trying WSL2 but when I installed it I bumped into this issue: github.com/microsoft/WSL/issues/4739 which is a deal-breaker, so at least for now, I reverted back to WSL1 until they fix it.

Collapse
 
fluffynuts profile image
Davyd McColl

Really useful, thanks! I've been wondering how to (a) tell if my existing wsl is v2 and (b) switch. Also liking powerline10k, after about 18 years of my own theme (:

Collapse
 
cdennig profile image
Christian Dennig • Edited

It automatically comes with the Windows version mentioned above. So, just try to convert a version 1 distro to version 2 (an example is in the article). Fastest way to check :) BTW, both versions can run in parallel.

And thanks for the feedback!

Collapse
 
fluffynuts profile image
Davyd McColl

Sorry, this was my lack of communication: what I meant to say was: I had these questions, and you answered them right at the top of the article, so I don't have them any more :D

Collapse
 
dpolist profile image
Daniel Polistchuck

Great article! One question: any idea how to run minkube on wsl2?

Collapse
 
cdennig profile image
Christian Dennig

Haven’t looked into it yet...but I would currently rather try k3s than installing minikube.