I have a friend thats setting up linux (ubuntu) on his machine. He has a windows installation. I personally use mac as my primary OS, but I’ve had a linux partition on my machine as well, and I’m having a slightly hard time giving him good advice as to what solution he should choose when setting up linux (I don’t even know how I would partition a disk on a windows machine to prep it for dual booting).

My question is quite simple: What are the pros/cons of WSL vs. Dual Booting vs. Virtualbox, both with regards to setup and with regards to usage?

  • tired_n_bored@lemmy.world
    link
    fedilink
    arrow-up
    19
    ·
    2 months ago

    WSL Pros: easy to use and to install Cons: it still runs on top of Windows and some hardware functions are not available. Also, terminal-only

    Virtualbox Basically the same as WSL but it could be slower being a layer2 hypervisor

    Dual booting Pros: a full-fledged Linux OS Cons: Harder to install and to mantain.

    • Fliegenpilzgünni@slrpnk.net
      link
      fedilink
      English
      arrow-up
      10
      ·
      2 months ago

      Dual booting Pros: a full-fledged Linux OS Cons: Harder to install and to mantain.

      Also, sometimes Windows being an ass and “accidentally” breaking the bootloader.

      I advice anyone to have just one OS per drive installed. Keep Windows and Linux separate if possible, or some Windows update may break GRUB.

      • azimir@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        2 months ago

        They did that to my daughter. I’d setup a laptop for her. The windows boot partition was still there (my bad for scraping every last bit of Windows off - it was setup in haste) and she accidentally chose windows from grub one day. The Windows Bootloader decided to change boot options in the bios and then remove grub somehow, but there was no windows on disk to launch so it was bricked.

        The next time I could out hands on the computer I scoured that disk clean of Microsoft’s plague rats so they wouldn’t get a finger in edgewise again.

  • mrvictory1@lemmy.world
    link
    fedilink
    arrow-up
    18
    ·
    2 months ago

    WSL: If your friend is a dev and needs Linux cli utilities, use this. Dual Boot: If your friend wants to daily drive Linux, use this. Shrink Windows NTFS partition within Windows then install Linux to blank space. Virtualbox: Testing ground for dual boot, your friend can familiarise themselves with Linux safely using a VM.

    • jacksilver@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      2 months ago

      This is what I was going to say.

      • If they’re a dev WSL is a godsend for development.
      • If they are looking to move away from windows, dual boot or live cd/thumb drive are good ways to test things out.
      • JackbyDev@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 months ago

        I never got around to using WSL for dev stuff, sadly. I was stuck on Windows 7 until December 2019 and have had a Mac for work ever since. For personal stuff I just use the MSYS environment included in Git for windows (it has bash and a few other things). If I ever got a Windows laptop for work again I’d probably put the time in to learn WSL.

  • Kangie@aussie.zone
    link
    fedilink
    English
    arrow-up
    12
    ·
    2 months ago

    WSL2 is “fine”. It has some performance issues when accessing files on the windows side of things from sick

    On a technical level it’s a Linux VM running containers for Distributions that get some mounts and for WSLg a directx video device.

    WSLg also provides an X server, Wayland compositor and a Pulse server so most gui apps “just work”.

    Good way to start learning or get a taste for things, and easier than a VM to get started.

    • atzanteol@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      2 months ago

      You don’t get the immersion of a new OS when you use wsl though. Which is fine if you just want some Linux compatibility for things like docker, but if you want the whole “desktop experience” then a VM is a better option. Either Hyper-V or VirtualBox will give you that with reasonable performance.

    • Antithetical@lemmy.deedium.nl
      link
      fedilink
      arrow-up
      7
      ·
      edit-2
      2 months ago

      This is the best answer. I’ve been doing it for years at work. Dual-booting is just very inconvenient and WSL(2) is the worst of both worlds.

      Install Linux on the machine and keep windows in a nice secure kvm-based cage where it can do less damage.

  • JackbyDev@programming.dev
    link
    fedilink
    English
    arrow-up
    10
    ·
    2 months ago

    These are three super different things that fill entirely different uses. It’s like asking if you should use a car, a boat, or an airplane. If you just wanna mess around then probably VirtualBox unless you only want terminal stuff to mess around, then you’d want WSL.

  • 7EP6vuI
    link
    fedilink
    English
    arrow-up
    7
    ·
    2 months ago

    can you define “machine”? if it’s a desktop: have you thought about an additional hdd/ssd? all the pros of dual booting, without the cons: you can simply unplug the windows drive if you install linux.

    but still do a backup!

  • beirdobaggins@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    2 months ago

    If you are going to dual boot and your computer has room for 2 drives. The way I would recommend doing it is to add a second drive for Linux, and disconnect to windows drive from the computer. Do a normal linux install. And then add the windows drive back in. Then you can set one of the drives as the default boot device and if you want to boot to the other just open the Boot options on boot.

    This keeps things totally separated and you can even remove one of the drives later if you want to single boot.

    • GenderNeutralBro@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 months ago

      Installing Linux after Windows should be fine without disconnecting drives.

      The reverse is troublesome. Microsoft’s installer is all too happy to shit on your drives, even the ones you’re not using for installation. But Linux installers are much more friendly to dual-booting and all kinds of complex setups.

  • lightnsfw@reddthat.com
    link
    fedilink
    arrow-up
    6
    ·
    2 months ago

    I use WSL for cli stuff and I have Mint running in a VM for desktop stuff. I briefly tried dual booting but it was a pain in the ass and I ended up rarely switching to the Linux partition in practice.

  • kbal@fedia.io
    link
    fedilink
    arrow-up
    5
    ·
    2 months ago

    I still have a laptop with Windows on it. Dual boot works for me. I only need Windows once in a blue moon, don’t want it using up any of my attention or the computer’s resources the rest of the time.

  • neidu2@feddit.nl
    link
    fedilink
    arrow-up
    5
    ·
    2 months ago

    In my book WSL and VM share the same downside in that you’re only abstracting Linux functionality in relation to the hardware.

    Linux really shines when it has full access to the actual hardware as opposed to asking it’s environment nicely if it’s allowed to do something.

    For example, I routinely need to change my IP address to talk to specific networks and network hosts, but having to step over the virtualisation or interpretation layer to do so is just another step, thus removing the advantage of running linux in the first place.

    Sure, VMs and dual booting have their uses, but the same uses can be serviced by an actual linux install while also being infinitely more powerful.

    I played around with WSL for a while, but you notice really quickly that it is not the real thing. I’ve used virtual box for some use cases, but that too feels limiting ad all of the hardware you want to fully control is only abstracted.

    I would say that unless he has a really good reason why he wouldn’t want to go for dual boot, then he should do just that.

  • Fliegenpilzgünni@slrpnk.net
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    2 months ago

    Maybe, another consideration might be to not run Linux on Windows in some way, but the other way around.

    Linux offers great virtualization, maybe you can use QEMU with KVM and GPU passthrough, and then run Windows inside this box.

    I find Linux more powerful and less annoying to use day to day, and having those annoyances inside a small virtualized container I can just shut down is more peaceful.


    WSL can be restricting, since Linux can’t access anything, and I think getting “the real and proper thing” might be better.

    And dual booting, by having both Windows and Linux on the same drive, is something I would advise against. Windows doesn’t play nice with others and often “accidentally” breaks the bootloader and hard drive permissions, leading only to trouble. If you dual boot, install them on a separate drive and select the booting drive manually in the BIOS.


    Also, why do you want to run Ubuntu specifically? Did you also look up for alternatives, like Fedora or Debian?

    • Bitrot@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      Most people are running Windows OEM licenses that don’t transfer to VMs. A retail license you can move around.

        • Bitrot@lemmy.sdf.org
          link
          fedilink
          English
          arrow-up
          2
          ·
          2 months ago

          It has activation issues as the license is tied to hardware. If you have a retail license tied to your account it will prompt you to transfer from another machine, OEM does not. Nowadays people don’t even get a key, although it can be extracted from the firmware.

          • Pika@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            2 months ago

            a retail license doesn’t even prompt that, just sign in with your MS account and bobs your uncle, that’s how I manage all of my VM stuff I just sign into my primary Microsoft account and it automatically activates, I’m sure one of these days it’s going to hit a Hidden activation limit but I’m not really sure how Windows works with that, I don’t change vm’s all that often.

            My main bottleneck for swapping fully off of dual booting is the annoyance when it comes to trying to configure GPU pass through with KVM, I would definitely be using that virtual machine for gaming on the few games that no longer work using proton but like it’s such a pain in the butt to set up, that and for the duration of me having to transfer the system I basically need to have twice the amount of disk space because I need to clone that data over to an image before being able to free up the partitions

  • breadsmasher@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    edit-2
    2 months ago

    Windows as a daily driver, want to do some development / docker usage based on Linux - WSL. Also you can if I remember correctly only run windows containers on windows as well as linux containers. You cant run windows containers on a linux host

    You want to daily drive Linux but sometimes swap back to windows for some specific purpose (like specific games or applications that proton doesnt work with), Dual Boot

    Only reason I would use virtualbox over WSL is if I need to work with a fully fledged Linux OS. I havent needed to do this since WSL though

    To prep for dual booting, simplest is to have windows installed first then use the graphical installer from Linux distro which lets you select a partition to split, resize and setup GRUB etc. Very easy to do. BACK YOUR SHIT UP THOUGH

  • TheDarkQuark@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    2 months ago

    For a person with not much familiarity with Linux, and just wants to check things out, I would recommend starting out with a VM. WSL is good, but that is not the “Linux experience”. Moreover, if they are not already familiar with the command line, it may be a bit intimidating. The same goes for dual booting. It’s more technical, and it’s more appealing to just jump back into Windows when things go wrong on Linux. VM approach though, gives you a sandboxed space (with DEs and all) where you can smoothly get familiar and comfortable with Linux before making the final switch. That’s my personal opinion for beginners.

  • NutWrench@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    2 months ago

    I’d love it if VirtualBox emulated some really basic 3D cards (Voodoo 3, Radeon 9800) so I could do some old school gaming. I have a few old Windows games that won’t run under Wine.

  • Aa!@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    2 months ago

    WSL is pretty good these days. Dual boot with Windows is still a pretty risky move with how easily Windows will overwrite your boot loader. I usually recommend you pick one os or the other rather than dual boot, so I’m in favor of WSL or virtualbox. Personally, I have never cared for needing to reboot just to switch operating systems. I tend to stick with one and the second one does nothing but take up disk partition space.

    WSL lets you run both simultaneously without rebooting. Virtualbox lets you do the same with extra setup. Virtualbox makes it easier to do GUI setups than WSL does, and the network configuration is a little more obvious.

    The best option is to get a second machine so you can run both. If that’s not an option, virtualbox is the better choice for learning. If you just want a Linux environment on your existing setup (similar to using a Mac) then WSL is usually good enough