Switching to WSL2 with Fedora over plain Fedora install for development?

12 points by Karsteski ↗ HN
Hi, I've finally gotten a software developer job! I've changed careers from being a chemist, which was really draining me.

Anyways, I've been doing pretty much all my coding on Linux (Ubuntu -> Pop_OS! -> Fedora), but I run Windows 10 on another SSD as I game as well, and Linux is just no where near a quality user experience for gaming, at least the kind of games I play. Note I also have an NVIDIA GPU lol...

I'd like to not have to constantly switch OSes, so I was thinking to use WSL2 to install Fedora w/ no GUI, and just do all my dev stuff through the command line, which I've gotten more familiar with lately. I do my editing using Neovim already, so that should be fine.

Has anyone on HN done something similar, and what has been your experience? Once I get a laptop in a few months to a year (hopefully a Framework laptop!), I'll use Fedora on there as well.

There's also a part of me that very much dislikes contributing to Microsoft's push to pull Linux users over, but at the end of the day I just need to get shit done :|

25 comments

[ 1.0 ms ] story [ 83.1 ms ] thread
I think there is a Fedora install available on the Microsoft store, but it is paid for and I’m not sure the proceeds will go to the Fedora maintainers.

I don’t like WSL much. It feels like a second class environment, where the Linux filesystem is accessible via a network share.

In any case, it works. Windows Terminal is good enough, but I find Windows a hopelessly confusing OS with lots of places where it seems unfinished.

Considered all its pain points, I’d go with a VM under VirtualBox or VMWare Workstation. You’ll get a desktop-like experience if you go full screen and you still can get to the filesystem via the VM’s host drive plumbing. And nothing prevents you from running Windows Terminal and ssh’ing into the proper VM.

Yeah, using Linux full screen in VMware Workstation is generally pretty good, and hard to tell there's a windows layer underneath most of the time.
Is there a way for me to run my current Fedora install as a VM in Windows? Basically I just want the simplest solution, which I guess is for me to ssh into my eventual Linux laptop. But since I don't know when I'll be getting that, I'm wondering what are the pain points of using Fedora through VMWare Workstation. I used VirtualBox when I was first trying out Ubuntu, and it felt noticeably less smooth. Note my main monitor is 1440p 165Hz, so I don't know if that affected things.
> my current Fedora install as a VM in Windows?

Not sure WSL2 will like Wayland. It seems better adapted to text-mode command-line Linux work (I'm aware it can run graphical apps). What I'd suggest is to deploy a new Fedora/CentOS WSL VM and copy your home into it.

> I used VirtualBox when I was first trying out Ubuntu

Oh yes. Unless it's a really nice machine and the hypervisor allows the VM to bypass hardware emulation when possible and use some form of virtio-like thing, it'll never be as fluid and snappy as when it's deployed on metal.

These are my solutions also, I do have a working Fedora in WSL2 (using the manual method of installation), but I still keep using the VMware Workstation. At this point, although the GUI is running, I'm only using it as a "remote ssh" from my VSCode and everything works like a charm.

Certainly WSL2 integration has some benefits, but I'm not really using any of them at this point. My Windows terminal sshs to the Linux VM, my VSCode terminal opens in the Linux VM and everything feels fine. That covers my development requirements pretty well and rest of the stuff I do with native Windows tools (and I rarely need to cross-access files).

On work computer, I use qemu to run arch & sid qcow2 vms, with whpx acceleration you get near native performance For networking You can use open vpn tap and a bridge to access guest from host This is obviously not ideal if you don’t have 8gb ram and don’t want linux gui With a wm like dwm and firefox running qemu takes up about 1.5gb ram
You could try using Qubes OS, which provides a very good UI for managing VMs, including Linux and Windows: https://qubes-os.org.
It works great, especially with Windows 11 where you can run X11/Wayland apps perfectly. Fedora isn't packaged for WSL2 at the moment but https://fedoramagazine.org/wsl-fedora-33 is a good way to do it - I use Arch Linux via this method and it works great.

The only difference between this article and today, instead of using that Powershell command to set your default user on login, use /etc/wsl.conf (https://docs.microsoft.com/en-us/windows/wsl/wsl-config#user...)

Do you know the disadvantage between W10 and W11 wrt. GUI apps through WSL2? What problems would I run into? I'd really rather not upgrade to W11, given all the fuckery Microsoft seems to be doing... I'd prefer to stick to W10 and hopefully in a few years I can just use Linux full-time.
W11 is just brilliant. Nothing can go wrong with it.

Why, just yesterday, my wife’s Windows 11 laptop automatically upgraded and along with the OS update decided to update the BIOS of the laptop as well! Which meant a sudden shutdown with several seconds of a blank screen at which point she was very keen on hard restarting and potentially bricking her laptop.

With brilliant decisions like these made for you how can you ever go wrong with Windows.

The main change that some people don't like is the Taskbar simplification. I personally think it's great and it's time to kill the pages of menus that every right-click option in Explorer has, that's some 90s shit. Otherwise, it's just a better looking Win10 with AutoHDR which, if you play games and have a HDR monitor, legitimately improves the look of many games
Import the docker image of fedora using wsl import. The image on the store arent published by the community
You can also try to run Windows in a VM and do GPU passthrough (assuming you also have an integrated graphics card aside from the NVIDIA GPU). Last I've heard it's rather easy to do nowadays, back in 2017 when I tried that it was quite finicky.
This is definitely not suitable for any sort of serious gaming, unfortunately
I have shifted from dual booting to fully windows + wsl (Ubuntu). The new GPU passthrough and GUI app support in Win 11 WSL is particularly useful as you can run full fledged dev tools like Intellij natively in Linux vs the WSL Remote trick VSCode uses while still having all the device driver polish and hardware/software compatibility of Windows.
So I'm guessing on W10 w/o GPU acceleration, using WSL/WSL2 with GUI apps is pretty terrible? I'd mostly just be using my GUI for running programs I'm actually writing, so I'm wondering how much of a problem this would be for me.
Virtually every meaningful laptop in the last 4-5 years has had an integrated GPU, even if it's a basic Intel one - even though my personal laptop model is 4-5 years old with such a GPU, I'm also able to run Intellij on WSL2 on it very comfortably. I do have 32 gigs of RAM though.
I prefer running things in VMware virtual machines. (I am used to WMare, you can use Oracle VirutalBox its free(mostly))

If you are into gaming on Windows 10, use Windows 10 as your main and a virtual machine of Linux for Dev.

Gaming on Windows 10 in a virtual machine will not be that good.

There is an issue with running VMware Workstation on Windows 10 with WSL2 on.

In the beginning it did not work at all

They have fixed it a little bit. Now you can run both at the same time but it creates limits for what VMWare Workstation can do.

The most important limit for me is the inability to run nested virtual machines.

This is probably not a problem for most users, but I have to turn off WSL2 and HyperV to run nested operating system on VMWare. This in turn means Docker Desktop will not run on Windows 10.

I am so used to virtual machines that I strongly prefer it to WSL2. It creates a natural demarcation between the two systems. It is trivial to return to a known state on VirtualMachine. Everything in Linux, FreeBSD etc works as expected.

There's some wsl fedora distro''s like this. https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL . Don't get the store image, it's not updated and is paid, which this is free.

BUT, I urge you to just download ubuntu on wsl. It's way more integrated and has alot more support. There's effectively no difference besides some library names which can be translated with "whatprovides" and apt vs dnf. As a Fedora desktop user at work and Ubuntu hater, with WSL it has the Microsoft "Stamp of approval" and gets all the new features and official support.

I would definitely go Ubuntu over Fedora if it's a more straightforward process
I am a webdev and I use mostly linux servers / docker for my job but still my work pc is windows 10 machine. WSL2 was incredibly slow for my dev job. It consumed a lot of RAM and CPU. I got permission problems inside wsl all the time - I edited files in some editor (eg phpstorm or visual code) and then the permissions were broken inside wsl2 for that file.. or the CPU started suddenly to go insane.

My experience was a pain in the ass. I dumped wsl2 or some virtualization and use this instead:

I have a small linux cloud instance with full ssh access. (I pay 4 USD / month). I use a free tool called mutagen to sync all my files on my windows machine to that linux machine. Sync is almost instant, it feels like working on local server.

Other plus, I can show to my coworkers and customers what I do on my server. Especially now when I work from home.

WSL2 is nice for smaller things, but I would not use it for full web dev server. I would if I could but it doesn't work nice for me. And somehow, it doesn't feel right... I know linux is fast but in wsl2 it is way slower.

On work computer, I use qemu to run arch & sid qcow2 vms, with whpx acceleration you get near native performance For networking You can use open vpn tap and a bridge to access guest from host This is obviously not ideal if you don’t have 8gb ram and don’t want linux gui With a wm like dwm and firefox running qemu takes up about 1.5gb ram
I've been using WSL for around 3+ years now, but with Ubuntu) ((and no GUI) installed. For front-end development I don't have any issues with it. WSL integration with Visual Studio Code is great.