12 ms·
Initial Impressions of WSL 2
- unicornfinder 6y agoI must say WSL2 has genuinely been huge for me, to the point where I've finally been able to ditch macOS for a desktop with a Ryzen CPU. Honestly it's mindblowing how far Windows has come - if I were Apple I'd genuinely be scared of losing a large proportion of power-users as Windows becomes an increasingly viable platform for development.
- k__ 6y agoHow does it compare to real Linux distributions? Does it have a package manager? Is it like Debian? What are the limitations?
- Tomte 6y agoIt is a real Debian (or, by default, Ubuntu). Original packages from Debian's servers are used. You're using apt, as usual.
- deleted 6y ago[deleted]
- jessermeyer 6y agoWSL2 is a full blown emulator / virtualization solution, so it runs a real linux kernel / distribution. The largest downside to me is no gpu passthrough from the host.
- satvikpendem 6y agoYou can even compile your own custom kernel for it. I've had to do so in order to run some modules that the WSL 2 kernel currently doesn't have.
- tyingq 6y agoThey say GPU passthrough is on the backlog in their post build FAQ. https://devblogs.microsoft.com/commandline/wsl-2-post-build-faq/ https://devblogs.microsoft.com/commandline/wsl-2-post-build-...
- jessermeyer 6y agoI've been tracking that. Almost certainly AMD exclusive since, AFAIK, NVIDIA prohibits GPU passthrough on their consumer cards so VPNs are forced into purchasing 'professional' grade GPUs.
- tym0 6y agoIt is an actual linux distribution. The default is Ubuntu but there are others (Suse, Alpine...)
- greggyb 6y agoWSL gives you a full Linux distro. You can use Debian, Fedora, Ubuntu, from the top of my head. These are default options. There are others available. Additionally, you can bootstrap to other distros. I know Arch was an early target. WSL1 replaced the init process. For Ubuntu, at least, snaps were not enabled, at least out of the box. There were occasional issues early on where the syscall translation was not perfect. For me, at least, these were all ironed out after a few revisions. Unsure if there were still edges I didn't hit. WSL2 takes advantage of virtualization technology, so should be an even better Linux experience.
- texasbigdata 6y agoThere were 4 "standard" distros in the Microsoft store IIRC
- greggyb 6y agoJust double checked in a Windows VM. These are available when searching WSL in the Microsoft Store. Some of these are for a fee. There are also a few results for terminal emulators and an X server. - Ubuntu (18.04 and 20.04) - Kali - Debian - Fedora (remix for WSL) - openSUSE-Leap-15 - SUSE Linux Enterprise - Alpine - Pengwin (Debian-based and apparently optimized for WSL, and an enterprise version) - Centos (7 and 8.1) -
- tapland 6y agoYou can run various Debian distros. It works like it should. You can run an x server and get a GUI as well.
- mehrdadn 6y agoIt sounds fancy but it's just a VM with a bit more polished Windows integration.
- k__ 6y agoHm, okay. That doesn't sound impressive anymore.
- moomin 6y agoNo, but the good news is you can literally run Arch, Debian and Fedora on the same machine with shared files.
- tsar9x 6y agoSystemd is not working.
- 6gvONxR4sf7o 6y agoI'm using full ubuntu in it. The only real pain is anything that relies on systemd (which comes up unsurprisingly often).
- Naomarik 6y agoI've also switched from Mac to a Ryzen desktop. So far the experience has been extremely good and performance is amazing. Been working with clojure and react native on WSL2 several months now. I didn't want it to be this way though. Apple has been continuously pushing out laptops that are not what I want. My Mac is also notifying me nonstop about 2FA authentication and iCloud storage, and I can't seem to turn those off. I used to eagerly await their keynote events to see what cutting edge innovations they will announce. There have been none I care about since Steve passed. The lack of a decent modern laptop (I just want a proper keyboard without touchbar, some ports, with a decent cooling system) and MacOS becoming more buggy and annoying has pushed me to find an alternative. WSL1 did not cut it for me, but WSL2 has taken Apple out of my mind entirely with regards to my development environment.
- lostmsu 6y agoWhy do you guys even use WSL? React does not work on Windows proper? If a few command line tools is all you need - there is MSYS and Git Bash. Genuinely curious: I use it mostly for testing, as some of the software we make supports Linux.
- lyricaljoke 6y agoI develop multi-platform C and C++ code (intermingled with some python for testing and automation), and my experience has been that while MSYS + Git Bash works, I run into 'rough edges' on that side much more frequently than on the WSL side.
- steveklabnik 6y agoI switched to Windows full time a few years back. I started with WSL1, but ran into some serious bugs (that have since been fixed) and made the full jump fairly quickly. I think a lot of folks take this path because it's just easier. The fact that I know I can do most of the stuff the same way I always have makes it an easier decision to make. I think there's also, for some people, an ideological component, that is, they're still using UNIX, it just happens to be in a Windows host, and that's easier to accept than come to terms with Windows just being a decent OS on its own merits. (I am not saying anyone in particular in this thread is that kind of person, of course.)
- cmrdporcupine 6y agoI really like WSL. And Windows 10, well, it's not awful. I don't hate it anymore than I hate Mac OS's GUI. I find things especially nice with the new Windows Terminal. But the piece missing is still first class support for X (or Wayland) Linux applications. Without GUI Emacs, for example, or some way of integrating the Windows Emacs well, I find the WSL experience not as productive as booting into my actual Linux partition. But it's like... 90% there. One thing I really like is that the Windows version of CLion will use SSH to connect into your WSL installation and use the Linux toolchain. So you can develop both Linux and Windows applications using the CLion GUI IDE on Windows, it's quite seamless.
- gmueckl 6y agoHave you tried using Emacs with an X server for Windows?
- cmrdporcupine 6y agoYes... it's not as well integrated as I'd like.
- akjssdk 6y agoYou can run emacs on WSL and just pass the X output to windows using an X server like VcXsrv. This works pretty seamless for me, no noticeable lag or anything.
- frankc 6y agoThis works very well. Another thing I do that works well, and I don't really see it brought up anywhere, is to use nomachine to connect to localhost. It's not seamless in the sense that you have linux apps side-by-side with native windows, but it gives you a full linux desktop experience (you need to install a linux desktop and wm in wsl for this to work well). Combining this with windows virtual desktop i can flip back and forth between windows and linux instantly without any vm.
- alexhutcheson 6y ago
- scarface74 6y agoThe Mac is 10% of Apple’s revenue. How much of that 10% do you really think are developers that would switch just because Microsoft supports Linux? Especially considering that macOS is a real certified Unix not just tacked on.
- ken 6y agoHow many developers care about "certified Unix", or can even say exactly what that means? Is anyone buying Macintosh computers in order to run their certified Unix software? Linux isn't certified, and none of developers using that seem to mind. If Microsoft got WSL "certified", would any Linux user consider it a better Linux than Linux?
- scarface74 6y agoNone. The point is how many people care about running Linux in a VM (which is all WSL2 is) on Windows instead of running a native Unix operating system? Out of those that do care about running Linux, what is the practical difference between running Linux in a VM on Windows and Linux on a VM on Macs?
- saagarjha 6y agoApple doesn’t put time and effort into making Linux on a VM feel at home on macOS.
- scarface74 6y agoIt doesn’t have to. How does WSL feel “more at home” than the third party VM solutions available for Macs?
- pjmlp 6y agoActually there are Linux distributions that are UNIX certified, namely Inspur K-UX and EulerOS 2.0. https://www.opengroup.org/openbrand/register/brand3617.htm https://www.opengroup.org/openbrand/register/brand3617.htm https://www.opengroup.org/openbrand/register/brand3622.htm https://www.opengroup.org/openbrand/register/brand3622.htm
- teleforce 6y agoThose of us who have been using Linux around the the year 2000 will remember the April fool joke on Slashdot about running Linux alongside Windows. The often repeated mantra, first they ignore you, then they laugh at you, then they fight you and then you win. The main reason of this seamless integration happening between Linux and Windows is most probably the fact that developers or the "cool kids" going to MacOS by the droves. Like what people normally say, the enemy of your enemy is your friend. Only time will tell how many of the "developers" will come to Windows via the unthinkable Linux route, but correctly done Windows and Linux integration is a potent OS combination.
- yjftsjthsd-h 6y agoHere we are: https://linux.slashdot.org/story/05/04/01/1453253/gentoo---gentoo-on-the-nt-kernel https://linux.slashdot.org/story/05/04/01/1453253/gentoo---g... (perhaps there were others)
- pjmlp 6y agoBack in those days, if Microsoft had seriously invested in the POSIX subsystem, I would never bothered again with Linux. We were deploying into production with Windows, Aix, HP-UX and Solaris. The Red-Hat Linux server that we had around was only for test purposes.
- driverdan 6y agoWhy use WSL2 instead of just running linux directly? Why do you need Windows in there?
- m_mueller 6y agodrivers.
- em-bee 6y agoto play windows games or run windows applications that don't work in wine or in a windows virtual machine. to comply with company policy that only supports windows on desktops.
- Kudos 6y agoVideo games. Though I've finally got a second GPU and am working on passthrough from Linux to a Windows VM.
- chupasaurus 6y agoI've solved this problem to myself by having a dedicated Wintendo.
- jfkebwjsbx 6y agoA lot of software (drivers, engineering suites, Visual Studio, games...) requires Windows or is better supported there or easier to work with. Others prefer the Windows desktop, in particular for multi-screen.
- 6gvONxR4sf7o 6y agoA huge number of things are terribly supported on Linux. Just as much better linux generally is for software dev, it's that same amount worse for most else. When I last tried going full linux (admittedly over five years ago), I remember wifi being a nightmare. Netflix had issues I can't remember specifically. Even ubiquitous formats like pdfs and word docs wouldn't always work correctly. More recently, I remember spotify being a pain and youtube not working as well. Maybe it's better now, but support for new mainstream products always lags in linux. It's why so many of us try to get the best of both worlds. Dual booting with mainstream OS and linux, or ssh'ing from a mainstream OS to a machine on linux, using OSX + unix terminal, or windows + unix terminal, both options together always seems better than either option alone. Kinda like how you could do anything in C++ that you can in Python, and vice versa. But the ecosystem is often what determines the best choice. Sticking with one and only one limits you.
- Zardoz84 6y agoBetter experience you will have using native linux, insterd of a glorified VM.
- jfkebwjsbx 6y agoApple lost the development train a few years ago. Windows + Linux VM has been a better platform for a long time, even before WSL! Microsoft recognized this and wanted to boost this workflow by providing it themselves.
- electricEmu 6y agoWindows can be controlled entirely by the keyboard, out of the box (Start+ArrowKey). MacOS always required extra setup with Karabiner and other tools to mostly accomplish the same thing. The BSD derived base in MacOS made a great developer OS but the windowing system often felt lacking.
- saagarjha 6y agomacOS has full keyboard access and you don’t need Karabiner to enable it.
- electricEmu 6y agoIt's my understanding that MacOS requires extra setup for those shortcuts regardless of Karabiner. If you feel that extra setup is acceptable then any almost modern OS will fit your needs. There's something to be said for standardized shortcuts that work on every MS Windows instance.
- unicornfinder 6y agoAll you need to do is enable full keyboard access in System Preferences -> Accessibility and it'll work.
- electricEmu 6y agoWhich keyboard combination moves windows around, the same as WIN+ArrowKey, after enabling "keyboard access" in MacOS?
- kelnos 6y agoI'm not sure about that. I've been running Linux as my daily driver for a good 20 years now (minus a few years on macOS when I foolishly bought some Mac hardware too poorly-supported by Linux to be usable). I finally gave up on Mac hardware last year and bought a Dell XPS 13. I went through the Win10 setup so I could easily shrink the Windows partition and install Debian in the remaining space. It frankly disturbed the hell out of me. Windows asked for consent (default to yes, of course) for a lot of invasive things, to the point that I wondered what it was going to do without asking. And even after I said no to them, I saw what I can only describe as ads all over Windows itself. Windows pushing me to use Edge, Windows pimping Cortana even when I said I didn't want to use it, etc. In the hour or so that I used it, I never wanted to use it ever again (and, indeed, I haven't). Apple and macOS certainly have issues of their own, but I never felt like Apple was trying to advertise to me or violate my privacy. Microsoft made it very clear that they ravenously wanted to do both to me immediately. I'll stick with Debian, thanks.
- tyingq 6y agoNo free lunch, of course. Faster file access with WSL2 (vs WSL1), if you stay in the Linux world. But if you point it at Windows files (/mnt/c, etc), it's pretty slow. WSL2 just moved the slowness from one side to the other. Accessing the Linux FS from Windows (\\wsl$\) is also slow. That said, I am a fan, and get a lot of use out of WSL1. Since I don't use the Windows interop much, WSL2 should be a performance win for me.
- drey08 6y agoYep. With WSL I can seamlessly access files from both Linux and Windows. I use the Terminal (Windows) and various Unix tools for a lot of stuff (compiling & testing on Posix, objdump, debugging). And I use Windows GUI tools for editing (Sublime), diffing (BeyondCompare), and so on. I get the best of both worlds. But WSL2 file access in `/mnt/c/` is now unbearably slow. So I just stick with WSL1. From what I've read, Microsoft intends to support both WSL1 and WSL2 for the foreseeable future. So that's good.
- tyingq 6y ago"Microsoft intends to support both WSL1 and WSL2" I'm not sure I believe them. Maintaining a whole tricky "fake" kernel/translation shim must be a lot of work.
- frankc 6y agoYou never know but as has been pointed out in different parts of this post, they have two different use cases in a sense. Windows developers who were using WSL1 aren't going to like the changes and i've heard a lot of complaints. However, people using primarily linux with windows as a nice shell with good hardware support and games are going to prefer WSL2. I think if they want to win over the biggest group of devs, and I feel pretty good about that since they were losing traction with them for years, they will maintain both, at least for a good while.
- drewg123 6y agoFreeBSD has a similar syscall translation layer (and has had it for over 20 years). They do it with a team of part-time volunteers. This is enough to maintain basic support, but FreeBSD still lack support for newer Linux syscalls which prevent things like the Linux binary version of Chrome from running on FreeBSD.
- judge2020 6y ago> Smoother web development Last I heard networking/sharing ports didn't work, has that been fixed or is there now a solution?
- unicornfinder 6y agoYup - all works now. If I start rails server I can access localhost:3000 from Firefox on windows, for example.
- abdusco 6y agoSupport for accessing exposed ports on docker containers using localhost:PORT is still spotty, though. I've set up a scheduled task to get WSL IP address and update an entry in hosts file then access using http://wsl:PORT http://wsl:PORT.
- greggyb 6y agoHave they gotten networking transparency working to the degree that it was on WSL1 yet? I tried an earlier preview of WSL2 and ran into a bunch of issues here.
- tapland 6y agoIt's still an issue afaik. But, might be because my install is old and it doesn't update that by itself.
- rvz 6y agoThat's great news, thinking about replacing my Ubuntu Linux install for Windows and having WSL2 if these changes and performance improvements are accurate. Windows Terminal looks pretty cool too, reminds me of Terminal.app on macOS with blurred backgrounds and theming too. Very cool blog post!
- Fredej 6y agoI've done exactly that. I had some issues with WSL but WSL2 does what I need it to do. Specifically what I need it to do is cross-compile the linux kernel (among other things) for embedded devices. This works flawlessly. Almost all my work has moved to WSL - the remaining bit (like UART and JTAG access) could be done with better USB support. So I'm definitely hoping for that!
- bootlooped 6y agoThe Windows Terminal app is very snazzy. I have only run into one problem with it, relating to using tmux. https://github.com/microsoft/terminal/issues/176 https://github.com/microsoft/terminal/issues/176 This is not a showstopper for me though, and I have been using it as my primary terminal application for many months.
- BiteCode_dev 6y ago> It’s still weird to say it, but Windows Terminal is hands-down the best terminal on Windows. Windows terminal is pretty good, but no, it's not yet the best terminal on windows. cmder is. It has panel split, quake mode, git integration... Now the read map of Windows Terminal is pretty convincing, so let's see how it plays out.
- Kudos 6y agoSurely the git integration is in the shell, not the terminal?
- BiteCode_dev 6y agoTechnically yes, but practically, cmder configures each shell it embeds (windows cmd, powershell, cygwing bash) to work with git automatically. So for the end user, ~=.
- rrss 6y agoEh, YMMV. I tried cmder/conemu for a while, and gave up after I fighting with one strange behavior after another for a few days. IMO, the best terminal on windows is a linux terminal running in WSL displaying to a windows x server. I use terminator and vcxsrv, and have not had any of the weird vim, ssh, tmux, etc rendering problems I had with cmder.
- WorldMaker 6y agoWindows Terminal has picked up panel split since v0.7: https://devblogs.microsoft.com/commandline/windows-terminal-preview-v0-7-release/ https://devblogs.microsoft.com/commandline/windows-terminal-...
- VWWHFSfQ 6y ago> Those pain points were solved in WSL 2 by embedding a whole first-party Linux VM inside Windows Wait so now it's just a regular Linux virtual machine? I thought it was a thin translation layer between the kernels? Kinda not as impressive now.
- mehrdadn 6y agoYeah don't get too excited, it's just a VM. The disk usage doesn't automatically shrink with usage, and I'm not sure if RAM does either (interested in knowing if they've done anything related to that), which were what I found most useful about WSL1. I wish they'd instead put all their effort from this into legitimately fixing the issues in WSL1 instead.
- mtzet 6y agoThe disk issue was probably going to be difficult to solve even with the WSL1 model if they wanted good IO performance. Using a proper Linux filesystem underneath is a decent compromise IMO. The RAM issue is a clear setback, and makes it annoying trying to do large compile jobs on the Linux side, though it's been a while since I've tried it. In theory it could be possible to handle coorporation between the Linux and Windows RAM usage patterns since they're running a very heavily modified kernel. I'd be very interrested in knowing if anything is hapenning on that front.
- gmueckl 6y agoIsn't Linux already capable of handing unused memory back to an underlying hypervisor? I vaguely remember that MS contributed code to support that kind of interaction with HyperV. Am I wrong?
- sz4kerto 6y agoThey do adjust memory reservation dynamically if I'm correct. It's very nice overall.
- patentatt 6y agoI think hyper-v does dynamically scale ram usage of vms, so it’s at least plausible that wsl2 does as well
- cloudking 6y agoBig fan of WSL, get power of Windows and the full power of Linux combined. Can easily switch between gaming and development.
- tsar9x 6y agoOne caveat is that WSL2 needs Hyper-V, and many anti-cheats won't work with it (many CS:GO anticheats, I think it will be true for many multiplayer shooters).
- XzAeRosho 6y agoReally? I've been playing for years now with Hyper-V enabled and hasn't been an issue. I think you can't play inside a VM (like Hyper-V), which is a different story.
- jrockway 6y agoThere have been games whose anti-cheat software incorrectly flagged Hyper-V hosts as being Hyper-V guests and would refuse to launch the game, but I believe they are all fixed. All my Blizzard games seem perfectly happy to run on a machine that has Hyper-V.
- eqvinox 6y agoI've been using Steam on (Debian) Linux for quite a while and haven't really run into issues. I mostly play Dota 2 and Stellaris, which come Linux native, but also a bunch of other stuff including quite a few Windows native / Proton-"translated" games. All this on AMD graphics with standard open source drivers btw, did not install either proprietary drivers or "special" open source versions. (Card is this in case anyone cares:) 0c:00.0 VGA … [AMD/ATI] Baffin [Radeon RX 550 640SP / RX 560/560X] (rev cf) OpenGL renderer string: Radeon RX 560 Series (POLARIS11, DRM 3.36.0, 5.6.2+, LLVM 9.0.1) OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.2 Then again for lack of a Windows installation I wouldn't know if I'm losing performance. It is however what I expect of the card's age and price segment (mediocre in both I'd say.)
- 6y ago
- Tomte 6y agoX410 is an X server that works so far very well with my WSL (1).
- jtdev 6y agoWhat are some use cases that would cause a person to choose Windows as their primary OS, but require WSL? At what point do you just move to a *nix OS and virtualize Windows on the rare occasion that it’s truly needed?
- andybak 6y agoI need Windows for Unity dev and VR.
- jtdev 6y agoIt seems that gaming/graphics/VR is one of the last vestiges of Windows outside of the enterprise and consumers who don't really care what OS they run.
- dijit 6y agoDeveloping linux software on windows is actually pretty painful. Actually, running any linux software in general such as middleman or Jekyll is pretty painful on Windows- I recently had a horrible time trying to get git-crypt working for a colleague of mine who was using Windows.. There's a lot of value in being able to just run "linux" (with bash, grep, sed, awk, gcc, python) while being able to access your normal files on a Windows desktop. You _can_ do this with VirtualBox but it's janky, slow, buggy and generally awkward.
- jtdev 6y agoWhy not just move to Linux?
- kbumsik 6y agoThe GUI isn't as great as Windows and it's often buggy. Let's face it.
- yulaow 6y agoDo you find the microsoft gui great? Honest question, because I have a desktop with windows and I find its gui a clusterfuck of randomness, especially since it seems two or three different ui "languages" are constantly fighting each other since w8.
- loulouxiv 6y agoSince this is based on Hyper-V, I guess it is a Windows 10 Professional-only feature ? Or did they enable a trim down version of Hyper-V which can be used on Home licenses ?
- andybak 6y agoThe latter
- frankohn 6y agoAs a long time free software and linux supporter I am a little bit afraid of this. It seems like a very smart move from Microsoft. They get rid of the abysmal performance of windows's file system and spawning new processes by using... linux! Provide also an excellent terminal so that developers have the best experience with command line tools, all this without leaving the convenience of Windows! Not surprising since they dominate the desktop market since forever being smart at strategy. The only weak point of WSL 2 to my point of view is that you say goodbye to development of native Windows application because you are effectively on Linux. It means you either setup cross-compilation which can be annoying either you go with Visual Studio, the old MS way. For the moment I will stay with MSYS2 plus Mingw64, they are both excellent and provide a good experience to develop native applications on Windows. At home I will keep using Ubuntu, of course. For the introduction of WSL 2, I think many of the people using Mac OS X may switch to Windows. They never fully embraced the free-software philosophy and chose Mac OS X because of the high-quality hardware and software and the good terminal experience with unix-like environment. They will easily switch to Windows now. The small group of people using Linux will probably stay on Linux because of dislike for Microsoft practices and the fondness for free software. Bad news for free software, good news for Microsoft shareholders!
- bzb3 6y agoGood news for end users like me. This was a pain point of Windows, now it's fixed.
- cmiles74 6y agoI think that people who really embrace the free software philosophy will continue to use Linux. I used Linux for years and I really enjoyed it on several levels. In my opinion, WSL2 is leveling out the playing field between Windows and MacOS. If you were doing web development (and many people are) it had always been so much easier to get up and running on a Mac. MacOS had native versions of all the stuff web developers use (Python, Ruby, PHP, etc.), on Windows things were always surrounded with a haze of "unsupported" and "non-standard". WSL2 doesn't entirely resolve this issue but it goes a long way towards getting it done. For myself, I have to do a lot more native Windows development and have had to switch from using Linux at work to Windows (running Visual Studio in a VM under Linux all day just wasn't cutting it). Having all the familiar tools available in WSL2 has made the transition much, much easier.
- emsy 6y ago> you do a lot of disk writes and stat calls on tens of thousands of files. Found the root problem right there. What the fuck is going on in modern web dev.
- jrwr 6y agoWow, per the block chart of how this works https://i.redd.it/po98dksksjx21.png https://i.redd.it/po98dksksjx21.png It's using the 9P Filesystem to sync the two between systems... that's interesting.
- yjftsjthsd-h 6y ago> It's using the 9P Filesystem to sync the two between systems... that's interesting. Not rare; qemu/libvirt does the same thing (well, as one option; qemu also supports smb).
- hp_hovercraft 6y agoI have been using a VM on a Windows 10 and I have to say, it's been great! On a dual monitor setup, I have the VM on one screen and have a windows browser on the other, and the performance is very much close to 1:1. I don't think I would ever need to install a dual boot system now.
- Zardoz84 6y agoI would keep using native linux.
- helen___keller 6y agoFor the past couple years I've developed on macOS, and the few years before that in a different role, on windows. On both machines I ended up resorting to a Linux VM to avoid frustrating differences between my dev environment and my prod environment. Windows was totally off, macOS nearly just worked but every now and then an update would kill my dev environment and I would have to spend a day fixing it. WSL1 was totally insufficient, and a few months ago I would say that I strongly prefer macOS to windows. Having toyed with WSL2, however, the speed and seamlessness has impressed me. I haven't tried it for full time work, but I'm getting the impression that it's superior to my current workflows with Parallels on macOS. That said I'd just prefer a high quality full-Linux-dev environment. Going to just lobby for a Thinkpad instead of a MacBook on my coming machine refresh.
- pkulak 6y agoI recent switched to a Linux desktop after doing the VM dance on MacOS for a few years and I can't believe I didn't do it sooner.
- fb03 6y agoI am now doing the opposite: When I need to dev for Windows or something (usually for a contract), I spin a Win10 VM on QEMU-KVM. If you guys have been virtualizing on VMWare or Virtualbox, try KVM. It's blistering fast and the whole SPICE protocol is amazing. You can actually get a usable, snappy 2+ desktop with dynamic resizing, audio redirection and USB redirection (which is SO good i was able to test using a USB soundcard and I got sound to play without underruns! quite a feat) Do it!
- liminal 6y agoBonus is that now Docker will work on Windows Home.
- lioeters 6y ago> get a proper, functioning, fast Linux environment up and running on my beefy gaming computer Since I didn't see it mentioned in this thread - if all one needs is Ubuntu VMs, i.e., for common web development setup, Multipass is a simple and easy tool: https://multipass.run/ https://multipass.run/ Made by Canonical, runs on Hyper-V (or equivalent), cross-platform support. I have not compared it with WSL 1 or 2, but it's been a smooth user experience.
- nickjj 6y agoJekyll is the only thing I don't run in Docker and it's nice to see he went from 8s to half a second. Full builds for my site (almost 300 posts) takes like 20 full seconds, but incremental builds when actively writing to see changes takes about 3 seconds. So if that 3 seconds ends up being half a second or less that would be a pretty big quality of life improvement. For Docker related projects (Flask, Rails, Phoenix, Webpack, whatever), WSL 1 is quite speedy already since the mount is happening in the Linux VM running Docker Desktop, not the WSL mount. I wonder if this will end up being any faster with a WSL 2 back-end for Docker Desktop. I'll have to wait until WSL 2 hits Windows stable to try it out.
- bitwize 6y ago> When you compile the whole gotdanged planet on every file save, you do a lot of disk writes and stat calls on tens of thousands of files. What kind of bizarre twisted hellscape do we live in where we just accept this as normal -- for a web page.
- alibert 6y agoJust a reminder that enabling Hyper-V (needed for WSL2) will make your computer boot your current Windows install inside a VM too. This might makes a slight performance impact. And you might also encounter issues with Type 2 virtualization software such as VirtualBox or VMWare Workstation. (I will still stick to WSL 1 because of that).
- jfkebwjsbx 6y agoThis is a very important detail, yeah. For ML, 3D, games and what not is probably better to keep Linux in another kind of VM.
- exacube 6y agothat seems odd; what is the performance impact of turning on Hyper-V for the root/host windows instance?
- zlynx 6y agoBasically no impact. At least for me. Some people seem to get terrible performance, but I don't know why. Their drivers? Or is it trying to run without Virtualization enabled in BIOS? AMD-V, VT-x, VT-d? I don't consider it odd. It is the way a Type 1 hypervisor works. Windows puts in some effort to hide most of that from the user.
- alibert 6y agoUnfortunately I have no number to give you. I did a search on the subject a while ago and all that I could find is numerous post on multiple forums with people indicating slowness, lower fps in games, shuttering. Weirdly, this is something that could be tested pretty easily with a benchmark. In my understanding on how a Hypervisor works, the only thing that I'm almost confident to say is that there is an impact but it's probably not noticeable or highly related to your workload (maybe on I/O?). People will probably not care about that impact in fact (considering that Hyper-V is enabled by default and there are multiple security features of Windows now relying on Hyper-V).
- e12e 6y ago
- Scene_Cast2 6y agoWhat I haven't seen mentioned is that WSL 1 nor 2 work with the modern Machine Learning GPU acceleration. From what I understand, WSL 1 doesn't have proper access to GPU, and for WSL 2 / Hyper-V, GPU pass-through isn't a thing for cards such as the 1080TI. On Windows, Conda / Anaconda is quite buggy, and dealing with a regular python install through the CMD command line isn't too pleasant either. Looks like the modern macbooks don't have any CUDA-capable GPUs. What do folks use for their ML projects? AWS?
- jfkebwjsbx 6y ago+1 For graphics acceleration work it is also a problem. I'd suggest avoiding MacBooks if you are in the ML field, or having a dedicated desktop machine somewhere that you connect to.
- alkonaut 6y ago> there was a glimmer of hope that Web Development on Windows would be viable. I wonder if the success of WSL this will risk making some tooling that is already less-than-stellar on windows (Git, for example) even worse when the group that actually has to work on windows proper shrinks.
- jfkebwjsbx 6y agoMicrosoft has been putting a lot of resources on Git for a while, improving and contributing back to the original project. I expect the Windows Git will keep improving if they keep this Windows+Linux trend.
- WorldMaker 6y agoPlus, the Windows team itself uses git day-to-day now and it would be silly for Windows developers to spin up Linux VMs to git commit on the Windows Kernel. (Windows being source controlled in git has contributed directly and indirectly to a lot of git performance upgrades/tweaks in the last couple of years, including and especially to git running well natively on Windows.)
- fb1 6y agoIve been using Docker Desktop with WSL2 and vscode for the past couple of weeks and its been pretty seamless so far. The performance has been great (on a ryzen 3600x PC and on my surface laptop 3), and was really easy to set up. I'm forced to use a Mac at work, and have generally dual booted to linux at home, but havent needed to so far.
- trocado 6y agoWSL2 is great but there are still some very annoying bugs, like when the host sleeps/hibernates and the clock drifts [1], or windows detach from the x server and can't be brought back. [1] https://github.com/microsoft/WSL/issues/4114 https://github.com/microsoft/WSL/issues/4114