3 ms·
Originally a Window dev, moved to Linux, eventually MacOS due to a lack of nice a DE on Linux and the nice UNIX base of MacOS. Before WSL1 I would run Linux in
by apatheticonion 6y ago
Originally a Window dev, moved to Linux, eventually MacOS due to a lack of nice a DE on Linux and the nice UNIX base of MacOS.
Before WSL1 I would run Linux inside a VM from Windows and use remote development tools (like VSCode via SSH, SSH tunnels for port sharing, etc). It was all pretty straight forward, stable and I had no issues.
I used WSL1 when it launched and it was _incredible_. Bash actually on Windows. My workflow changed because of the level of integration I had with Windows. I could run browser automation tools against my Windows browsers, from Linux. I could run Windows programs from bash.
WSL2 came on the scene and introduced a hypervisor layer and I essentially came full circle. Sure it has some smarts around memory VM allocation - but it doesn't always work right and you're never really certain it's not running, consuming memory. Network port mappings were automatically tunneled, but only in one direction and they would occasionally fail causing random issues that require a reboot to solve. Now GUI windows are shared with Windows via RDP, cool..
Ultimately, WSL2 is the attempt to take Linux VM and make it appear like it's not a VM. Maybe it'll get there one day, but due to the got-ya's it's not for me.
I have since reverted back to using my choice of distro inside my choice of hypervisor, where I know what's going on and don't have to mentally reverse engineer the magic when it goes wrong.
- flukus 6y ago> I used WSL1 when it launched and it was _incredible_. Bash actually on Windows. My workflow changed because of the level of integration I had with Windows. I could run browser automation tools against my Windows browsers, from Linux. I could run Windows programs from bash. Cygwin has been able to do this for 2 decades, actual bash plus other unix tools compiled to actual windows exe's. You can even run some gui tools if you run an xserver on windows. Even WSL1 wasn't as good, there were too many issues like tail not working properly on windows files, issues with network shares, interop, etc. I pretty quickly reverted to cygwin.
- bostonsre 6y agoWSL 1 was an ok attempt but yea, it had a lot of rough edges. From my experience WSL 2 is a bunch better and I definitely like it better than when I used cygwin (but that was 10 or so years ago). Cygwin is an ok shell, but being able to yum install stuff and run linux programs on wsl 2 has been awesome.
- jcelerier 6y agoBut msys2 does exactly the same without a VM
- NavinF 6y agoUgh. Cygwin was such a pain back when it was the only option. It was yet another ABI and had all the breakage that implies. Even today, so many open source projects are full of ifdefs for cygwin. I much prefer WSL1 and I've only run into a couple of issues over the last year (can't set Windows time from Linux and ssh-agent doesn't work out of the box) which is a significant improvement over cygwin or even a proper linux distro (which would occasionally boot to a black screen after updating anything related to X)
- flukus 6y agoThe same or similar patches exist for WSL. One of the examples I gave was tail not working on windows files, cygwin has had a patch for years so it just works, ubuntu had to add the same or a similar patch to work in wsl.
- okaram 6y agoYou can still run WSL1, you know ...
- bostonsre 6y agoI use wsl2 now with centos and I don't have any networking or memory allocation issues like the ones you describe. > Ultimately, WSL2 is the attempt to take Linux VM and make it appear like it's not a VM. Maybe it'll get there one day, but due to the got-ya's it's not for me. In my experience, its been pretty great and elegant to work with. I've used it for ~1.5 years so far and they seemed to have broken down a lot of those vm walls to make it seem like some kind of hybrid windows + linux operating system. Doing stuff like 'code .' from within wsl to open the current wsl working dir in the vscode windows gui is pretty neat. And you can also do kind of neat stuff like writing to your windows clipboard from within WSL by running the powershell windows executeable. This is in my wsl .bashrc to do that: function cb () { powershell.exe -command "\$input | set-clipboard" } echo "hello" | cb # write hello to my windows clipboard
- manigandham 6y agoYou can still run WSL1, side-by-side with WSL2, even on a per-distro basis.