Windows WSL v2 or VirtualBox for Linux scripting on Win10

Manasaurus

Recruit
I'm taking a class which requires extensive use of Linux commands, might have to run programs on Linux as well. I'm way too dependent on windows to change the OS and don't think my laptop can handle dual boot. Came across two viable options. A couple articles suggest WSL if its just command interactions since it would be faster than VM, but they go on to mention two different versions of WSL and use the term interchangeably for both. As per my understanding, WSL v2 seems to be a virtual machine in itself. was wondering if someone has experience using it for getting familiar with the Linux environment. I would've gone for virtualbox, but worried about laptop's performance.
 
I prefer wsl coz I'm lazy and it works well, especially its tight integration with windows like shared folders or say in an ubuntu wsl console I run "code ." and it opens visual studio code windows app. Quick setup too.

Only advantage I see with virtualbox is you can run any OS/distro in a VM for trial etc, some features like snapshots etc. which you probably don't need for your classes. More effort to get it working.
 
I prefer wsl coz I'm lazy and it works well, especially its tight integration with windows like shared folders or say in an ubuntu wsl console I run "code ." and it opens visual studio code windows app. Quick setup too.

Only advantage I see with virtualbox is you can run any OS/distro in a VM for trial etc, some features like snapshots etc. which you probably don't need for your classes. More effort to get it working.
hey thanks for the reply. this is wsl v2 that you use? also how does the shared folder work? a separate drive or does the file explorer treat a file i create using linux shell the same as native window files?
 
WSL2 hands down, you dont need to deal with any config bullshit, you have everything setup from the get-go itself and if you are on windows 11, you can even run GUI apps on WSL2, the interchanging terminology is between WSL, WSL2 and WSLg. WSL was the first release, 2 came after that and is essentially a full blown VM in windows, and WSLg is an 11 exclusive feature which allows apps with a UI to run on it.
check this thread out on how to get started.
 
I've used both and you can make both work. If you're new to Linux though go with the VM. WSL2 mostly works but it has some quirks, and if you run into a problem that is WSL specific you are less likely to find help, whereas an Ubuntu VM has less things that can go wrong. If you're confident with Linux in general then WSL2 is good enough.

BTW dual boot is always an option, there's no laptop being sold today that "can't handle" dual booting linux. But probably not worth it for a class, only if you like that kind of stuff.
 
hey thanks for the reply. this is wsl v2 that you use? also how does the shared folder work? a separate drive or does the file explorer treat a file i create using linux shell the same as native window files?
Yep wsl2 on win11 but insider canary edition.

The wsl location shows up in win11 file explorer alongside your C: drive so I don't need to start the wsl console to access my files in the wsl user home folder for example.
 
I've used both and you can make both work. If you're new to Linux though go with the VM. WSL2 mostly works but it has some quirks, and if you run into a problem that is WSL specific you are less likely to find help, whereas an Ubuntu VM has less things that can go wrong. If you're confident with Linux in general then WSL2 is good enough.

BTW dual boot is always an option, there's no laptop being sold today that "can't handle" dual booting linux. But probably not worth it for a class, only if you like that kind of stuff.
yeah i mean, i do also not want the hassle of dual booting. but my laptop is 5 years old and while i'm sure it is capable of dual boot, I didn't want it to affect my daily use like other programs and games and stuff
 
Use a VM.

WSL2 is nice but it's easier if you already have linux experience because it has its own quirks that aren't necessarily Linux quirks and finding help with that can be challenging. You'll be googling random errors in both cases but it'll be easier in the VM case :p
 
Use a VM.

WSL2 is nice but it's easier if you already have linux experience because it has its own quirks that aren't necessarily Linux quirks and finding help with that can be challenging. You'll be googling random errors in both cases but it'll be easier in the VM case :p
That's for wsl1 not 2, 2 is essentially a full blown vm without a GUI, like a server and all stuff works fine now. only issue was systemctl compatibility and they Hava already fixed that too
 
Back
Top