3 ms·
WSL 2 is pretty decent honestly. I've been using WSL 1 + Docker for full time web development since early 2018 on Windows 10 Pro. Upgraded to WSL 2 when it hi
by nickjj 6y ago
WSL 2 is pretty decent honestly.
I've been using WSL 1 + Docker for full time web development since early 2018 on Windows 10 Pro.
Upgraded to WSL 2 when it hit the stable release and it works quite well. The only thing that sucks is mount performance for files outside of WSL 2's file system but if your source code is inside of WSL 2's file system it's very solid.
This is with ~$850 worth of 6 year old hardware too (i5 3.2ghz, 16gb of RAM, 1st generation SSD, etc.). I never bothered to upgrade because everything I do around Flask / Phoenix / Rails / Node development + running Docker / VMs + etc. works great. I do video editing too.
If anyone is curious what it's like, I made a video where I went over all of the tools I use on Windows and WSL 2 to have an acceptable dev environment for Linux based development https://nickjanetakis.com/blog/a-linux-dev-environment-on-windows-with-wsl-2-docker-desktop-and-more https://nickjanetakis.com/blog/a-linux-dev-environment-on-wi....
It covers both the Windows tools and how I have everything configured on the WSL 2 side of things (tmux, terminal Vim, etc.).
- 91edec 6y agoI'm really torn with WSL. WSL1 has far superior performance when performing I/O tasks on the mounted Windows drives, but slower than WSL2 locally. WSL2 is unbearably slow when performing I/O on the mounted Windows, using vim with a git pluggin or FZF is crippling. So I attempted to just use WSL2+vim on the linux local file system, but then when I try to run Windows npm scripts in a folder UNC paths cannot be understood by CMD.exe. It is the only thing preventing me from fully switching over.
- znpy 6y agoHave you considered switching to GNU/Linux instead? Given that you do all your work in a Linux environment already...
- nickjj 6y agoIf you have npm installed in WSL 2, what use cases are you running into where you need to run Windows npm scripts? You could exclusively run npm commands inside of WSL 2 and never have to touch cmd.exe.
- 91edec 6y agoI have to run npm scripts in Windows land because they launch electron apps that require Windows.
- spondyl 6y agoI agree with the sentiment around I/O which is the last remaining pain point. I only use it for Dropbox since my org files live there but I ended up installing the Dropbox CLI instead. It kinda sucks though since WSL 2 doesn't have a proper init setup meaning I have to manually start Dropbox's daemon anytime I restart
- stinos 6y agofolder UNC paths cannot be understood by CMD.exe Does using Powershell instead of CMD solve this for you perhaps (I mean, it does wrt UNC, but I don't know what else you're doing with it)?
- mehrdadn 6y agoWSL 2 just makes VirtualBox unusable for me in practice so I can't really use it. And honestly if I wanted a VM I'd just use VirtualBox.