Windows Subsystem for Linux commonly abbreviated as WSL is a compatibility layer developed by Microsoft to allow users to run a Linux environment directly on Windows. This feature enables allows users to run Linux applications and execute Linux commands without the need for a separate Linux virtual machine or dual-boot configured.
There are many benefits and advantages of WSL to the tech industry, these include:
- Development flexibility: it allows developers to work with both Windows and Linux applications on the same machine. This is so important and convenient for those who develop cross-platform applications since they can test and run their code in a Linux environment without needing a dedicated Linux machine.
- Collaboration and compatibility: It also fosters collaboration between Windows and Linux users. Linux developers can work alongside Windows developers a lot easier by providing a common environment for sharing code, debugging, and running applications.
- Seamless integration: It provides seamless integration between Windows and Linux environments which allows system administrators, developers and other users to leverage the power of Linux tools and utilities while still working within the Windows ecosystem.
- Cloud and container compatibility: The concept of containers and cloud computing continues to gain prominence, WSL provides compatibility by allowing developers to build and spin Linux containers on their Windows machines using tools like Docker and Kubernetes.
- Learning and experimentation: It provides an accessible platform for individuals who are eager to learn Linux and experiment with Linux-based technologies. It allows users to explore the various Linux commands, workflows, and software development practices without the need of running a Linux VM.
- Familiar Linux tooling: It also ships an extensive range of Linux command-line tools and utilities to Windows. Developers and system admins are able to utilize popular tools such as Bash, SSH, Git, package managers, and scripting languages in the Windows environment.
By following this guide to the end, you should be able to run RHEL / Fedora on Windows Subsystem for Linux (WSL).
Enable Windows Subsystem for Linux(WSL)
This guide required Windows 10 or later systems with WSL enabled. Installing the WSL feature on Windows is a very straightforward process. To achieve that, launch Powershell with elevated privileges and execute the below command:
wsl.exe --install
Sample Output:

WSL is installed with Ubuntu as the default Linux distribution, however, you can check and use any other distribution available. To check the available distributions, use:
wsl --list --online
Sample Output

If you want any other distro aside from the default Ubuntu, you can use the command:
wsl --install -d DISTRO-NAME
Once installed, enable WSL:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Restart the system
Restart-Computer -Force
From the output when listing the available distros, we didn’t see Fedora/RHEl, the big question is, how can one run them? Do not worry! This guide has got that covered. Follow the below steps to learn how to run RHEL / Fedora on Windows Subsystem for Linux (WSL)
Run Fedora on Windows Subsystem for Linux (WSL)
Now you can proceed and run Fedora Linux on your Windows system by following the below steps. First, download the installer file.
You can also use the below command to pull the file zip. As of this guide, the latest
##For Fedora 37
wget https://github.com/yosukes-dev/FedoraWSL/releases/download/37.20230124.0/Fedora37.zip
##For Fedora 36
wget https://github.com/yosukes-dev/FedoraWSL/releases/download/36.20230124.0/Fedora36.zip
##For Fedora 35
wget https://github.com/yosukes-dev/FedoraWSL/releases/download/35.20211113.0/Fedora35.zip
##For Fedora 34
wget https://github.com/yosukes-dev/FedoraWSL/releases/download/34.20211113.0/Fedora34.zip
Once the download is complete, extract it. You will realize that there are two files in the extracted folder i.e. Fedora.exe and the RootFS.
The name on the EXE file will be used as the name of your machine, to have multiple instances, you can rename it as desired.

Now you can register the system to WSL by running the Fedora.EXE file:

For WSL2, you can also register the machine with the command:
wsl --set-version RHWSL 2
Once the installation is complete, you will have access to the Fedora Linux shell.

You can view Fedora Linux added to the list:
wsl --list --all
If it is not running, start it with the command:
wsl --set-version <VM Name> <Version>
To connect to the VM, use:
wsl --distribution <VM Name>
For example:
wsl --distribution Fedora37
Sample output:

Now you can make the desired configurations to the Fedora system such as updating packages and adding your own users. If you want to stop the machine, use:
wsl --terminate Fedora37
To remove its, use:
wsl --unregister Fedora37
Sample Output:

Run RHEL on Windows Subsystem for Linux (WSL)
It is also possible to run RHEL using Windows Subsystem for Linux (WSL). First, download the required release from the Github releases
You can also pull with curl or wget as shown:
##For RHEL 9.1
wget https://github.com/yosukes-dev/RHWSL/releases/download/9.1.0-1750/RHWSL.zip
##For RHEL 9
wget https://github.com/yosukes-dev/RHWSL/releases/download/9.0.0-1468.1655190709/RHWSL.zip
##For RHEL 8.7
wget https://github.com/yosukes-dev/RHWSL/releases/download/8.7-1054/RHWSL.zip
##For RHEL 8.6
wget https://github.com/yosukes-dev/RHWSL/releases/download/8.6-754.1655117782/RHWSL.zip
Once the file has been downloaded, extract it and run the RHWSL.exe to register the machine to WSL.

For WSL2, you can register the machine with the command:
wsl --set-version RHWSL 2
The registration will proceed as shown:

Once complete, view if the RHEL machine is listed under WSL:
wsl --list --all
Sample Output:

You can also connect to the running machine with the command:
wsl --distribution RHWSL
Once the machine starts, you can register to RHEL as usual with the command:
subscription-manager register
Sample Output:

Attach the subscription:
subscription-manager attach
Now install desired packages:

Verify the installation:

To remove the machine, stop and unregister it:
wsl --terminate RHWSL
wsl --unregister RHWSL
Final Thoughts
At this point, you should be able to run RHEL / Fedora on Windows Subsystem for Linux (WSL). You should also be able to connect, stop and unregister the machine on WSL. I hope this was informative.
See more:
- How To Run Arch Linux on Windows WSL
- Running Linux GUI applications on Windows Subsystem for Linux (WSL)
- Run Podman on Windows with WSL2
- How to run Linux on Windows Server 2019 with WSL