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?
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.
Also, terminal-only
this is not the case anymore. You can run graphical applications.
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.
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.
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.
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.
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.
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.
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.
Virtual box is slow. Install Windows in a KVM based VM instead
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.