8 ms·
I have yet to find an use case for WSL, when you can't interact with hardware devices and working with the filesystem has its (performance) limitations. Docker
by laxis96 4y ago
I have yet to find an use case for WSL, when you can't interact with hardware devices and working with the filesystem has its (performance) limitations.
Docker in WSL2? Yeah sure, but I'd rather install a VM or connect to a remote Docker host.
MinGW/MSYS2 have been around far longer and have none of those issues... Then again, MSYS2 does not have a Linux kernel running under it but that shouldn't be a problem unless you want to run containers.
- spiffytech 4y agoI love WSL because it makes Windows just as nice to use for development as Linux / macOS. No weird janky "this is buggy on Windows" stuff, because as far as the app is concerned it's just a Linux VM.
- djfobbz 4y agoI've never looked back since WSL came out...I'm not promoting Windows but growing up in a corp environment, Windows is where my comfort zone was...I tried switching to Textmate on Mac back in 2007 but really hated not having a direct map of various shortcut commands using CTRL key. The closest I got to this Win experience was on Linux Mint using XFCE...but again, it was pain anytime I was sent MS Office docs. Sublime/WSL has been my goto since it dropped! Slowly getting used to VSCode as well.
- jefftime 4y agoI'm not sure why you're being down voted. This is my exact use case as well. For what I do (front end development) it's incredibly nice to have a Linux command line for most things. I'm stuck on Windows due to legacy .NET Framework apps, so when I have to dip back into Windows I can
- matsemann 4y agoFilesystem things are faster in WSL+Docker than native Windows for me. At least npm stuff. I'd rather skip the hassle of VM, and why use a remote Docker host? And same with MinGW. I like being able to just do stuff out of the box as if it was an Ubuntu install. Much more ergonomic, and can just follow whatever official guide for the tool I'm trying to use, without depending on someone making it possible to use in MinGW/MSYS. So I kinda disagree, for all things you mention I prefer WSL.
- mfer 4y agoWSLv2 (which you need for Docker) is a VM. Windows just manages it for you.
- Datagenerator 4y agoSeen Podman Desktop, can replace Docker licenses.
- anderspitman 4y agoI was playing with Docker Desktop and Podman Desktop for the first time yesterday. Podman Desktop looks really good. I was impressed with how well it integrated with the docker engine I already had running, and it even had at least one feature I couldn't find in Docker Desktop (pulling an image from the GUI).
- kyriakos 4y agoUnfortunately last time I tried it on Windows it doesn't integrate with the existing wsl Linux distributions the same way docker desktop does.
- ziomek77 4y agoSame here, Docker for windows is slow, like VERY slow. After I moved Docker to WSL2 my app is starting and running at least 10 times faster. The difference is so huge that I wonder why it is even possible to use Docker natively on Windows file system. It's crazy. I'm talking 60-90 seconds to bootstrap and run each page each time under Windows filesystem to around 5s (yes the app is very slow) under WSL2
- anderspitman 4y ago> I wonder why it is even possible to use Docker natively on Windows file system Wait, is it? I thought that Docker on Windows has always run in a VM. Used to be Hyper-V directly and now they're moving towards WSL2[0]. [0]: https://www.docker.com/blog/docker-hearts-wsl-2/ https://www.docker.com/blog/docker-hearts-wsl-2/
- polyvisual 4y agoI can `tail -f` a file on windows. That's enough use case for me :D
- w4rh4wk5 4y agoI am still on WSL1 due to the filesystem performance with WSL2. I recently tried to move more of my workflow towards MSYS2 but various things keep breaking for me without obvious reasons. Latest issue I encountered was that GNU parallel simple does not work. [1] [1]: https://github.com/msys2/MSYS2-packages/issues/3289 https://github.com/msys2/MSYS2-packages/issues/3289
- cowmix 4y agoI've done A LOT of performance tests of running ML tasks (via Docker) on WSL vs raw Ubuntu on the same hardware. The performance of WSL is about the same as native - some tasks are actually faster, some slower -- but net out to be the same. These tasks include: compiling a Docker image (1 hour), deinterlacing video with a NN, Open Whisper, etc.
- rr888 4y agoIts crazy, I've gone in circles between WSL, dual boot win/linux, VMs, everything on windows, remote linux servers, containers in Docker Desktop. Right now I'm back to just using Windows and ignoring Linux altogether, which seems to work best with the exception of Python.
- skrowl 4y agoWindows desktop with full linux servers via SSH is the sweet spot for me. I don't EVER find that I need some kind of *nix command on my local machine when developing, but that's also because I'm not afraid of PowerShell / stuck on bash.
- pxc 4y ago> don't EVER find that I need some kind of *nix command on my local machine when developing, but that's also because I'm not afraid of PowerShell / stuck on bash. Have you sorted out how to get fuzzy tab completion in PowerShell, short of the buggy, menu-y integration available with fzf? Do you find the everything you need is just already in PowerShell or so you sometimes run third party command line executables? If the latter, how do you deal with lack of man pages?
- CoolCold 4y agoyou probably know, but just in case - you can call for `wsl`/`wsl.exe` in your command pipes, i.e. PS C:\Users\coolcold> netsh wlan show interfaces|wsl -- fgrep Mbps Receive rate (Mbps) : 121.5 Transmit rate (Mbps) : 121.5
- anderspitman 4y agoIf for one did not know that, so thanks. That's pretty cool.
- pram 4y agoI use WSL2 for pytorch and company because the newer (WSL) kernel has CUDA support oob if you have the nvidia drivers installed on the Windows side. It’s actually extremely convenient.
- atseajournal 4y agoDug up my login for this site to thank you for this bit of info -- I'd been idly wanting to try some GPU-powered python scripts, and the setup on Windows made it unappealing. Now I can use 'em!
- pxc 4y agoEarlier this year, I started a job where I had to use a Windows desktop for the first time in a little over a decade. For a while, I did as little in WSL as possible, and leaned hard on PowerShell, MSYS2, and Scoop. After a few months, I abandoned the 'native' tools in favor of WSL due to performance and compatibility issues. I wish MSYS2 were the solution, because at least then there'd be one (WSL sucks too).
- sz4kerto 4y ago> but I'd rather install a VM WSL is a proper VM, just managed very efficiently by Hyper-V. > the filesystem has its (performance) limitations It's a normal Linux filesystem, there's no difference in performance vs. a full-fledged Linux VM. (which it is anyway) Are you referring to WSL1?
- pxc 4y ago> > the filesystem has its (performance) limitations > It's a normal Linux filesystem, there's no difference in performance vs. a full-fledged Linux VM. (which it is anyway) > Are you referring to WSL1? WSL2 just exchanged the performance problems with the Linux guest environment's native filesystem for performance problems when the Linux guest accesses Windows' filesystem. Those are still there and they're still atrocious.
- veesahni 4y agoWith WSL2 I got rid of VM's for local development. Cross OS filesystem performance is poor. The solution is to keep everything within WSL. Code stored, built & edited in WSL. VSCode + WSL extension makes it possible to "edit" from host without loosing performance.
- coldacid 4y ago>With WSL2 I got rid of VM's for local development. No you didn't, you just let Windows hide them from you. WSL2 is essentially a Hyper-V VM running Linux with some programs bridging between it and the Windows host -- or two such VMs with some additional bridging (for Wayland and audio) if WSLg is enabled.
- cma 4y agoInstalling WSL2 has the weird side-effect of somehow breaking other Hyper-V VMs like some android emulators.
- jxdxbx 4y agoI am not a developer but I find it useful to just be able to use rsync and a few other tools I am used to from Mac and Linux. Same reason I install Homebrew on Mac.
- CoolCold 4y agoInterop adds some value, i.e., from Windows side PS C:\Users\coolcold> netsh wlan show interfaces|wsl -- fgrep Mbps Receive rate (Mbps) : 121.5 Transmit rate (Mbps) : 121.5 or, from WSL side, you can invoke Explorer for current folder via simple explorer.exe . or notepad ..or..
- Longhanks 4y agoImagine spinning up a whole Linux VM to filter some text. In all seriousness though, is there a reason ripgrep doesn’t suffice?
- LordDragonfang 4y ago>Imagine spinning up a whole browser engine just to view/edit some text >Something something vim/emacs. There's value in having a compatibility layer for a universal command line. Besides, even WSL2 is barely a VM
- vips7L 4y agoIs there a reason powershells Select-String won’t suffice?
- DaiPlusPlus 4y agoTo summarise: PowerShell is awkward.
- bodangly 4y agoIt’s awkward when used to text pipelines, but the object oriented output is just so much nicer to parse and interact with for me that after spending some serious time with Powershell I am a huge fan. Being able to use the CLR directly and any .NET packages is killer.
- vips7L 4y agoIME PowerShell is superior to posix shell text parsing.
- anderspitman 4y agoWhat I'm excited about is the prospect of nontechnical people being able to use a GUI like Docker Desktop to install and manage apps in a nicely sandboxed environment. I think Docker is still too targeted towards developers, but Docker Desktop is already a huge step forward in usability for people who aren't comfortable on the command line.
- pxc 4y agoAre you imagining something like Flatpak for Windows? Don't Microsoft Store apps have some sandboxing? What's the end goal with the non-developer use case you have in mind?
- nailer 4y ago> Docker in WSL2? Yeah sure, but I'd rather install a VM You just did.
- moondev 4y agoAre you referring to mounting physical disks? You can do that with wsl2: https://learn.microsoft.com/en-us/windows/wsl/wsl2-mount-disk https://learn.microsoft.com/en-us/windows/wsl/wsl2-mount-dis...