Which one is better -- WSL2 or USB booted Ubuntu?

  • Thread starter Arman777
  • Start date
  • #1
2,149
183
I have started to use WSL2 for a couple of weeks, and I quite enjoy it. I code as a hobby and sometimes for my work-related issues (physics-related stuff), but I am not a software developer or engineer.

Currently, I am using Windows10. However, I am thinking of using Ubuntu from now on and maybe choosing another distro in the future. Is USB bootable Ubuntu is a good option for the long run-or daily usage, or should I stay with the WSL2? I was thinking dual-boot, but I don't want to do that, I guess.

So, in summary, as a daily usage basis and for coding from time to time, should I ditch Windows10 and start to use Ubuntu via a USB bootable, or should I stay in windows but use WSL2?

The other thing is I don't know how the USB portable Ubuntu works for a long run ? Can I upload many files, use zoom ? How long one USB drive last ? Is it slower than dual-boot or WSL2 ? etc.
 

Answers and Replies

  • #2
13,323
7,241
I like WSL also. Although a pure implementation of Linux will have less issues especially when windows is taken out of the mix as the hosting OS.
 
  • #3
pbuk
Science Advisor
Gold Member
2,770
1,473
Coding without a decent IDE is not productive, and running a decent (GUI) IDE on WSL is not practical so that rules that out.

Using a USB as your root file system is s...l...o...w and not recommended for development where things like working with git hammer the file system.

Dual booting from a SSD is OK but becomes an 'either/or' in other words you will either work in Windows or in Linux and not switch between them.

That leaves installing a virtual machine (VM) which has many advantages. I recommend VirtualBox.
 
  • #4
36,685
14,501
Coding without a decent IDE is not productive
This is a very personal thing. I never use an IDE when coding, and I'm productive. Of course, I code almost always in Python, which is probably much easier to code in without an IDE than languages that have a lot of boilerplate.

That leaves installing a virtual machine (VM) which has many advantages. I recommend VirtualBox.
+1 to this recommendation. I think VM's are a very underappreciated option.
 
  • #6
2,149
183
VScode can run on both windows and WSL via a file server that can be installed by VSCode. I’ve used it and it’s just great making edits seamless across both environments
Definitly I am also using VSCode for over a year now and its perfect. It also runs on WSL2 and you can change/edit files from WSL2. Here is one picture

Adsız.png


You can edit also those files + use git and do many more...
Using a USB as your root file system is s...l...o...w and not recommended for development where things like working with git hammer the file system.
yeah I searched a lot and the people always say it will be slow.
Dual booting is also risky, I can mess up while doing it or maybe one update can mess all things..

That leaves installing a virtual machine (VM) which has many advantages. I recommend VirtualBox.
I think VM's are a very underappreciated option.
I thought about that as well but my computer has only 2 cores and 8 ram with inteli5. Probably the Ubuntu in VM will be vary laggy since I dont have enough ram and cpu power...

I guess until I get a decent computer I am stuck with WSL2. Today I added the oh my posh https://ohmyposh.dev/ engine to WSL2. It looks really cool so its nice to have WSL2...
 
  • Like
Likes pbuk and jedishrfu
  • #7
36,685
14,501
Probably the Ubuntu in VM will be vary laggy since I dont have enough ram and cpu power...
VMs run on the native CPU, not with emulation, so they won't be any slower CPU wise than your host machine running Windows.

As for RAM, Linux tends to run better with limited RAM than Windows does.

Also, the VM is only running when you open it; you can always just shut it down, just like any other application, if you need to free up the RAM and CPU it is using.
 
  • #8
2,149
183
VMs run on the native CPU, not with emulation, so they won't be any slower CPU wise than your host machine running Windows.

As for RAM, Linux tends to run better with limited RAM than Windows does.

Also, the VM is only running when you open it; you can always just shut it down, just like any other application, if you need to free up the RAM and CPU it is using.
Idk...I think its risky..I guess wsl2 is good for now.
 
  • #9
pbuk
Science Advisor
Gold Member
2,770
1,473
VMs run on the native CPU, not with emulation, so they won't be any slower CPU wise than your host machine running Windows.
Er, no - you can't dedicate all your CPU resources to the VM. To get similar performance in most desktop applications you need to devote at least 2 physical cores to each VM which means you need at least 4 physical cores in total.

my computer has only 2 cores and 8 ram with inteli5. Probably the Ubuntu in VM will be vary laggy since I dont have enough ram and cpu power...
It may be worth giving it a try (and 8MB ram is plenty, allocate 3 or 4 to the VM), but the CPU is likely to be limiting I agree.

Idk...I think its risky..I guess wsl2 is good for now.
Not much risk with a VM, but note that VirtualBox does not play nicely with WSL so you can't switch between the two (without a change to Windows Hypervisor settings and a reboot).
 
  • #10
36,685
14,501
To get similar performance in most desktop applications you need to devote at least 2 physical cores to each VM which means you need at least 4 physical cores in total.
Not for Linux, at least not in my experience. I've run a Linux VM just fine on a machine with only 2 physical cores. Admittedly, that was on a Linux host, and the OP is running a Windows host, and the Windows hypervisor might not be as performant. But Linux VMs can be pretty lightweight.

VirtualBox does not play nicely with WSL
Hm, this I wasn't aware of. This would indeed be a major issue in my view.
 
  • #11
pbuk
Science Advisor
Gold Member
2,770
1,473
Not for Linux, at least not in my experience. I've run a Linux VM just fine on a machine with only 2 physical cores. Admittedly, that was on a Linux host, and the OP is running a Windows host, and the Windows hypervisor might not be as performant. But Linux VMs can be pretty lightweight.
Yes sorry, my comments were in relation to VirtualBox running on a Windows host. When developing I often have build processes running in the background which swallow a whole core when active, making the foreground GUI editor unresponsive.

If you are just editing and running a Python script then 1 core is fine!

VirtualBox does not play nicely with WSL.
Hm, this I wasn't aware of. This would indeed be a major issue in my view.
Yes, VirtualBox needs control of Hyper-V and so does WSL2. There may be a workaround but I haven't looked too hard; I've been running Windows 11 on the insider programme on my development machine for some time so quite a few things break and then get fixed later, I don't have time to follow them all up!
 
  • #13
2,149
183
Er, no - you can't dedicate all your CPU resources to the VM. To get similar performance in most desktop applications you need to devote at least 2 physical cores to each VM which means you need at least 4 physical cores in total.
Wish I had that. Or more :)
but the CPU is likely to be limiting I agree.
yeah because aI have also tried couple of years ago...
VirtualBox does not play nicely with WSL so you can't switch between the two (without a change to Windows Hypervisor settings and a reboot).
yes I have also read that from somewhere else.
VirtualBox needs control of Hyper-V and so does WSL2. There may be a workaround but I haven't looked too hard; I
WSL2 is also a small virtual box actually, so that explains that..
One thing about WSL2 is that X-Windows programs need special vGPU drivers running on windows in order to have app windows appear on the desktop.

https://devblogs.microsoft.com/comm...ilable-for-the-windows-subsystem-for-linux-2/

https://docs.microsoft.com/en-us/windows/wsl/tutorials/gui-apps

WSL1 couldn't do this.
I am really waiting for this but its still not avaliable in windows (10) home
 
Last edited:
  • #14
2,149
183
I am writing this message from Ubuntu 20.04 in VM. It's working fine now. Maybe I should dual boot and use ubuntu or some other distro. Unlike my expectations, the ubuntu in vm is working really fine for me. Theres some so small lag but its normal.
 
  • #15
36,685
14,501
I am writing this message from Ubuntu 20.04 in VM. It's working fine now. Maybe I should dual boot
If Ubuntu is working fine for you in a VM, that's going to be a lot simpler and easier to deal with than dual booting.
 
  • #16
2,149
183
If Ubuntu is working fine for you in a VM, that's going to be a lot simpler and easier to deal with than dual booting.
Thats true...I also want to try other distros in VM. Maybe openSUSE and Fedora. My computer specs are not good enough to upgrade windows11 so this is chance for me to completely remove W10 and switch to Linux.

For that reason I might actually try to remove windows or dual boot and only use linux. But before doing that I ll try some distros for couple of months to see how it feels like.
 
  • #17
pbuk
Science Advisor
Gold Member
2,770
1,473
Thats true...I also want to try other distros in VM.
That's a great strategy. Coming from Windows and particularly with a lower spec machine I recommend you try Linux Mint Xfce Edition.
 
  • #18
2,149
183
That's a great strategy. Coming from Windows and particularly with a lower spec machine I recommend you try Linux Mint Xfce Edition.
Thanks, I'll try that
 
  • #19
2,149
183
I have tried couple of distros and I really fell in love with the fedora 34. I have dual booted with windows and I must say I am really impressed by it. The applications run so smootly and i have discovered that the w10 is just a bloated OS. I am thinking to delete the windows10 if no problems occur for some time. I ll never open w10 meanwhile since with its horrible upgrades it can alter the boot system
 
  • #20
pbuk
Science Advisor
Gold Member
2,770
1,473
I have tried couple of distros and I really fell in love with the fedora 34.
Really? Are you using the Gnome desktop that comes in the standard distro? I just can't get on with any desktop that thinks it is a good idea to put the main menu for an application in a different place to the application window - or maybe you are using a different spin.

Anyway, if you like it, go for it! Beware though that a lot of Linux info for newbies assumes you are using an Ubuntu-based distro, and also that a lot of information for Fedora/RHEL/Centos talks refers to the yum package manager which has been replaced by dnf.
 
  • Like
Likes Vanadium 50
  • #21
2,149
183
Really? Are you using the Gnome desktop that comes in the standard distro? I just can't get on with any desktop that thinks it is a good idea to put the main menu for an application in a different place to the application window - or maybe you are using a different spin.
Yes its the gnome (default version). I find it minimalistic and it kind of forces me to use the terminal more instead of the file system. The desktop is all yours and unlike W10 most of the applications (spotify, vscode) runs so smootly.
Anyway, if you like it, go for it!
Thanks!
lot of information for Fedora/RHEL/Centos talks refers to the yum package manager which has been replaced by dnf.
yes I was used to apt, and realized that its useless in fedora...
 
  • #23
36,685
14,501
I have tried couple of distros and I really fell in love with the fedora 34.
One thing to consider with Fedora is that you will need to upgrade every year or so; as I understand it, Fedora only supports a given version for 13 months. I have heard that the frequent upgrades can be a pain for some users.

One nice thing about Ubuntu is their LTS (long term support) releases, which are supported for 5 years. An LTS comes out every two years; the last one was 20.04, and 22.04 will be the next one, to be released next April. If you don't need bleeding edge applications, the five year support period is really nice. I have been running nothing but Ubuntu LTS releases since 14.04 (which came out in April 2014) and have had generally good experiences with them.
 
  • #24
pbuk
Science Advisor
Gold Member
2,770
1,473
One thing to consider with Fedora is that you will need to upgrade every year or so; as I understand it, Fedora only supports a given version for 13 months. I have heard that the frequent upgrades can be a pain for some users.
Yes that's a good point, although its a bit more complicated Fedora releases are effectively only supported for 13 months from release. So the Fedora 34 that you installed last week which was released in April is already 6 months into its cycle: assuming Fedora 36 is released on schedule, Fedora 34 will reach End of Life in May 2022.

It happens that Fedora 35 is scheduled for release in a few days, on 2nd November, so this is a bad point in the cycle from that point of view.
 
  • #25
2,149
183
One thing to consider with Fedora is that you will need to upgrade every year or so; as I understand it, Fedora only supports a given version for 13 months. I have heard that the frequent upgrades can be a pain for some users.

One nice thing about Ubuntu is their LTS (long term support) releases, which are supported for 5 years. An LTS comes out every two years; the last one was 20.04, and 22.04 will be the next one, to be released next April. If you don't need bleeding edge applications, the five year support period is really nice. I have been running nothing but Ubuntu LTS releases since 14.04 (which came out in April 2014) and have had generally good experiences with them.
I must agree with that. A LTS for Fedora 34 would have been nice. I hope I don't encounter with many problems.
Yes that's a good point, although its a bit more complicated Fedora releases are effectively only supported for 13 months from release. So the Fedora 34 that you installed last week which was released in April is already 6 months into its cycle: assuming Fedora 36 is released on schedule, Fedora 34 will reach End of Life in May 2022.

It happens that Fedora 35 is scheduled for release in a few days, on 2nd November, so this is a bad point in the cycle from that point of view.
It seems that Fedora 35 is coming in a couple of days..Maybe I upgrade it immediately or wait for a month.I looked at the fedoradocs and I saw something like this.

https://docs.fedoraproject.org/en-U...rading-to-the-next-fedora-workstation-release

If upgrading is that simple, its really good. However, it seems that old kernals do not get deleted and seems that theres a special script to delete them.
 

Related Threads on Which one is better -- WSL2 or USB booted Ubuntu?

  • Last Post
Replies
0
Views
1K
Replies
3
Views
743
Replies
3
Views
1K
  • Last Post
Replies
2
Views
1K
O
  • Last Post
Replies
2
Views
2K
  • Last Post
2
Replies
34
Views
6K
Replies
7
Views
12K
  • Last Post
Replies
6
Views
45K
Replies
5
Views
9K
  • Last Post
Replies
11
Views
2K
Top