skip to content
~/bermudev/blog

Installing Fedora on Windows Using WSL

/ 2 min read

Fedora WSL logo

For the past few weeks, I’ve been forced to use Windows (I know, it’s a long story) and thus leave behind my Linux development environment. However, for some time now, Windows has offered the opportunity to integrate Linux systems into the desktop more or less natively through WSL (Windows Subsystem for Linux).

The thing is, although major distributions like Ubuntu, Debian, OpenSuse, or even Kali Linux offer support, not all distributions make it easy to use this feature.

So, I’m going to take advantage of the fact that I’ve been really liking Fedora 39 lately to show you how to install your own distributions with just a few commands.

Installing Fedora!

The first step is to enable WSL2 on the Windows system. You can do this from the console with the following commands:

dism.exe /online /enable-feature /
featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl.exe --set-default-version 2

Now, to install Fedora or any Linux distribution you want, you need to download the container image as rootfs for your distro. In the case of Fedora, you can find it at this link.

And finally, import it by giving it a name and a storage path:

wsl.exe --import Fedora-39 . fedora-39-x86_64.tar.xz

With this, you can now run and launch your distribution with:

wsl.exe -d Fedora-39

Super easy!

The next step will be to configure it to your liking, updating, installing components, etc.