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

  • Thread starter Arman777
  • Start date
  • Tags
    Ubuntu Usb
In summary, using WSL2 for a couple of weeks has been enjoyable. However, he is considering using Ubuntu from now on and may choose another distro in the future. Dual booting from a SSD is an option but becoming an "either/or" in other words he will work in Windows or in Linux. He recommends using a virtual machine (VM) which has many advantages, such as running VSCode.
  • #1
Arman777
Insights Author
Gold Member
2,168
192
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.
 
Technology news on Phys.org
  • #2
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.
 
  • Like
Likes Arman777
  • #3
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.
 
  • Like
Likes Arman777
  • #4
pbuk said:
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.

pbuk said:
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.
 
  • Like
Likes Arman777
  • #6
jedishrfu said:
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...
pbuk said:
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..

pbuk said:
That leaves installing a virtual machine (VM) which has many advantages. I recommend VirtualBox.
PeterDonis said:
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 don't 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
Arman777 said:
Probably the Ubuntu in VM will be vary laggy since I don't 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
PeterDonis said:
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
PeterDonis said:
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.

Arman777 said:
my computer has only 2 cores and 8 ram with inteli5. Probably the Ubuntu in VM will be vary laggy since I don't 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.

Arman777 said:
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
pbuk said:
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.

pbuk said:
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
PeterDonis said:
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!

PeterDonis said:
pbuk said:
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
pbuk said:
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 :)
pbuk said:
but the CPU is likely to be limiting I agree.
yeah because aI have also tried couple of years ago...
pbuk said:
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.
pbuk said:
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..
jedishrfu said:
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
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.
 
  • Like
Likes pbuk
  • #15
Arman777 said:
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
PeterDonis said:
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.
 
  • Like
Likes pbuk
  • #17
Arman777 said:
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.
 
  • Like
Likes Arman777
  • #18
pbuk said:
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
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
Arman777 said:
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
pbuk said:
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.
pbuk said:
Anyway, if you like it, go for it!
Thanks!
pbuk said:
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
Arman777 said:
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
PeterDonis said:
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
PeterDonis said:
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.
pbuk said:
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 there's a special script to delete them.
 
  • #26
Arman777 said:
I must agree with that. A LTS for Fedora 34 would have been nice. I hope I don't encounter with many problems.
LTS releases are not what Fedora is about: there are other distros based on Fedora that have longer release cycles (CentOS, OpenSUSE, the commercial RHEL).

Arman777 said:
It seems that Fedora 35 is coming in a couple of days..
A beta was released today: release is still scheduled 2 Nov.

Arman777 said:
Yes upgrades should go OK, providing you keep software you have installed up to date.

Arman777 said:
However, it seems that old kernals do not get deleted and seems that there's a special script to delete them.
This is also true of Ubuntu and most other distros; there is no harm in having old kernels on the disk.
 
  • Like
Likes Arman777
  • #27
pbuk said:
This is also true of Ubuntu and most other distros; there is no harm in having old kernels on the disk.
thats good to know.
pbuk said:
LTS releases are not what Fedora is about: there are other distros based on Fedora that have longer release cycles (CentOS, OpenSUSE, the commercial RHEL).
I see, that makes sense. While I was searching the distros I have learned that fedore is more used by developers and it uses most recent version of the kernels. Currently I am using 5.14.13 and the lastest release is 5.14.15 so I guess that's kind of nice...
 
  • #28
pbuk said:
there is no harm in having old kernels on the disk.
The only inconvenience with having a large number of old kernels is that they all have an entry in the boot menu, which you normally won't see (since Linux will normally boot into the default kernel, which will be the most recent one), but which you will see if for some reason there's an error during boot--but also, whenever you update installed packages, if any of them require recomputing the boot menu, it takes a lot longer if there are a large number of kernels. There are ways to remove old kernels that are no longer needed (with apt it's apt autoremove), and sometimes it's worth doing so.
 
  • Like
Likes Arman777
  • #29
Arman777 said:
Currently I am using 5.14.13 and the lastest release is 5.14.15 so I guess that's kind of nice...
Now it has been updated to 5.14.14. The kernel update speed is impressive.

It seems that deleting old kernels might have disadvantages. As you have said, there might be some booting or application problems which then I might need to boot from the old kernel.

PeterDonis said:
but also, whenever you update installed packages, if any of them require recomputing the boot menu, it takes a lot longer if there are a large number of kernels. There are ways to remove old kernels that are no longer needed (with apt it's apt autoremove), and sometimes it's worth doing so.
pbuk said:
This is also true of Ubuntu and most other distros; there is no harm in having old kernels on the disk.

In my boot menu, I am seeing 3 different kernels + one plain Fedora version. I thought that at each kernel update, I'd see a new option in the boot menu, but from my search, I have found that you can set a limit on this via - installonly_limit=3 - in /etc/dnf/dnf.conf file. Thats also nice to change that limit.

The other good thing I like about Fedore is the key-bindings for the applications by using super key I can do pretty much everything (opening applications, switching from one application to another etc.)
 
  • #30
Arman777 said:
It seems that deleting old kernels might have disadvantages. As you have said, there might be some booting or application problems which then I might need to boot from the old kernel.
Yes, it's worth keeping the last one or two kernels in the grub menu so you can revert if necessary.

Arman777 said:
from my search, I have found that you can set a limit on this via - installonly_limit=3 - in /etc/dnf/dnf.conf file. Thats also nice to change that limit.
Yes, this keeps things tidy: I don't see any point in increasing the limit for the reason mentioned by @PeterDonis

Arman777 said:
The other good thing I like about Fedore is the key-bindings for the applications by using super key I can do pretty much everything (opening applications, switching from one application to another etc.)
This is more about the Gnome 3 desktop than it is about Fedora. This is the same desktop that is used in the core distribution of Ubuntu, and I dislike it intensely!
 
  • Like
Likes Arman777
  • #31
pbuk said:
Yes, it's worth keeping the last one or two kernels in the grub menu so you can revert if necessary.
indeed.
pbuk said:
Yes, this keeps things tidy: I don't see any point in increasing the limit for the reason mentioned by @PeterDonis
I was actually thinking to decrease it lol. But I am not going to do that.I also think 3 is good.
pbuk said:
This is more about the Gnome 3 desktop than it is about Fedora. This is the same desktop that is used in the core distribution of Ubuntu, and I dislike it intensely!
Well I kind of bored with the Wİndows look. So I did not wanted to go another distro that looks like windows itself...I have also used Ubuntu and I don't like it somehow.
 

1. What is the difference between WSL2 and USB booted Ubuntu?

WSL2 (Windows Subsystem for Linux 2) is a feature of Windows 10 that allows users to run a Linux environment directly on their Windows machine, while USB booted Ubuntu is a full installation of the Ubuntu operating system on a USB drive that can be booted on any computer. Essentially, WSL2 is a virtualized version of Linux within Windows, while USB booted Ubuntu is a standalone operating system.

2. Which one is faster, WSL2 or USB booted Ubuntu?

This depends on a variety of factors, such as the hardware specifications of the computer and the tasks being performed. In general, WSL2 may have a slight performance advantage since it is running directly on the host machine's hardware, while USB booted Ubuntu is running on external hardware. However, the difference in speed may be negligible for most tasks.

3. Can I access all of my files and programs on WSL2 and USB booted Ubuntu?

Yes, you can access your files and programs on both WSL2 and USB booted Ubuntu. However, the way you access them may differ. In WSL2, you can access your Windows files through a mounted drive, while in USB booted Ubuntu, you can access your Windows files through the USB drive itself.

4. Which one is more user-friendly, WSL2 or USB booted Ubuntu?

This is subjective and depends on the user's familiarity with both Windows and Linux. WSL2 may be more user-friendly for those who are already comfortable with Windows, as it allows them to access a Linux environment without having to switch operating systems. On the other hand, USB booted Ubuntu may be more user-friendly for those who are more familiar with Linux and prefer a full operating system experience.

5. Can I use both WSL2 and USB booted Ubuntu on the same computer?

Yes, you can use both WSL2 and USB booted Ubuntu on the same computer. However, you may encounter conflicts if you try to access the same files or programs on both environments. It is recommended to choose one option and stick with it for consistency.

Similar threads

  • Programming and Computer Science
Replies
1
Views
612
  • Computing and Technology
Replies
6
Views
906
  • Computing and Technology
Replies
11
Views
2K
  • Computing and Technology
Replies
21
Views
2K
Replies
38
Views
3K
  • Computing and Technology
Replies
13
Views
2K
  • Computing and Technology
Replies
1
Views
1K
  • Computing and Technology
Replies
15
Views
4K
Replies
6
Views
6K
Replies
16
Views
2K
Back
Top