Fedora in Windows Subsystem for Linux
Fedora 42 introduced a new image for use with Windows Subsystem for Linux (commonly referred to as WSL). This will allow users to have a simple, easy to set up Fedora environment for development and testing use.
Multiple distributions may be run side by side in different namespaces, sharing the same kernel. Conceptually, the workflow is similar to a container, but it has been optimized to support an interactive Linux development & testing. WSL manages a lightweight VM with Wayland, PulseAudio, and some extra filesystem mounts provided. The user’s choice of distro, such as Fedora, is run in an isolated namespace with its own root image. Filesystem state, including the root filesystem and home directories are also preserved between uses.
The Fedora changes are fully described at [[Changes/FedoraWSL]]. It is similar to the cloud and container images, but some developer-focused packages such as manual pages, wget, and vim have been preinstalled. Some changes specific to WSL for X11 and Wayland compatibility have also been preconfigured.
Prerequisites
-
Windows 11 (recommended), amd64 or arm64. Windows 10 may work, but is not a focus as it will be [https://www.microsoft.com/en-us/windows/end-of-support end-of-life soon]
-
Virtualization extensions must be available. If you are testing in a VM - be sure this is enabled in your VM settings. Some cloud services restrict this to specific instance types.
Install WSL on Windows 11, Windows Server 2022, or Windows Server 2025
Windows Server 2022 needs to be updated to KB5014678 (OS Build 20348.768) or later first before installing WSL2. Please see the blog post WSL 2 distros are now supported on Windows Server for more details.
Microsoft has full instructions on setting up WSL at WSL Install. A summary follows.
wsl --install
will enable the hypervisor prerequisites, and prompt for reboot if needed.
wsl --install
Downloading: Windows Subsystem for Linux 2.4.10
Installing: Windows Subsystem for Linux 2.4.10
Windows Subsystem for Linux 2.4.10 has been installed.
Installing Windows optional component: VirtualMachinePlatform
Deployment Image Servicing and Management tool
Version: 10.0.26100.1150
Image Version: 10.0.26100.2894
Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.
The requested operation is successful. Changes will not be effective until the system is rebooted.
The requested operation is successful. Changes will not be effective until the system is rebooted.
After rebooting, you can proceed to the next section to install Fedora as a distribution in WSL.
Installing Fedora in WSL
Downloading the Fedora WSL tarball
The latest build for Fedora 42 beta may be fetched from download.fedoraproject.org for: - amd64, CHECKSUM - aarch64, CHECKSUM
Checksums may be verified using the same steps used to validate other Fedora images as described at Verifying checksums on Windows systems.
Installing Fedora with wsl.exe
First, check the version of WSL you are using by running wsl.exe --version
. Follow the steps below based on the version.
For WSL versions 2.4.4+:
-
From the command line, install the tarball with
wsl --install --from-file .\path\to\Fedora.tar.xz
wsl --install --from-file .\Fedora-WSL-Base-42.20250204.2206.x86_64.tar.xz
Installing: .\Fedora-WSL-Base-42.20250204.2206.x86_64.tar.xz
Distribution successfully installed. It can be launched via 'wsl.exe -d Fedora'
-
Enter the environment by running
wsl -d Fedora
-
When prompted, provide a username. This will be the default user, and it will be added to the groups for
sudo
usage
For WSL versions prior to 2.4.4:
(These steps assume you are using PowerShell)
-
Make a directory for the Fedora distribution with
mkdir $ENV:LOCALAPPDATA\WSL\Fedora
-
Import the WSL tarball with
wsl --import Fedora $ENV:LOCALAPPDATA\WSL\Fedora .\Path\To\Fedora.x86_64-Rawhide.tar.xz
-
Enter the environment with
wsl -d Fedora -u root
-
Manually run
/usr/libexec/wsl/oobe.sh
to create the default user -
exit
the environment logged in as root -
Enter the environment as the newly created user with
wsl -d Fedora -u <username>
Reporting bugs
Perhaps you’ve found an already-reported bug. Please look at:
-
Bugzilla - component: wsl-setup - for initial user creation & WSL configurations.
-
fedora-kiwi-descriptions issues - for feedback & issues related to the preinstalled packages in the WSL package.
-
When filing the bug, it’s very helpful to include:
-
WSL & Windows versions, which you can retrieve with <code>wsl.exe --version</code>
-
exact steps you’ve performed (and whether you can reproduce it again)
-
screenshots or videos, if applicable
-
system journal (log), which you can retrieve by
journalctl -b > journal.txt
-
all output in a terminal, if started from a terminal
-
your system description
-
Source code
Package sources are at: rpms/wsl-setup
Want to help? Learn how to contribute to Fedora Docs ›