The Windows Subsystem for Linux (WSL) is a compatibility layer developed by Microsoft that allows you to run a Linux environment directly on Windows without the need for a virtual machine or dual-boot setup. This guide will show you how I set up my Fedora Linux WSL, which is my main general purpose WSL distribution.
Requirements
Windows 11 24H2
1. Installing Fedora Linux 42 WSL
First, enable or install Windows Subsystem for Linux. Install Fedora Linux WSL and set it as the default distribution.
Run the newly-installed distribution. It will ask you to enter a username. By default it does not ask you to set a password so we’ll set one ourselves. Obviously, replace <yourusername> with the username you’ve set earlier.
sudo passwd <yourusername>
Update the packages by performing an upgrade.
sudo dnf upgrade
2. Setting Up Fedora Linux 42 WSL
Create directories the I always have in my machines.
cd ~mkdir Projects Temp
Edit DNF’s configuration file to make it faster in general. I also added some settings that I find convenient.
echo 'defaultyes=True' | sudo tee -a /etc/dnf/dnf.confecho 'deltarpm=True' | sudo tee -a /etc/dnf/dnf.confecho 'max_parallel_downloads=10' | sudo tee -a /etc/dnf/dnf.conf