Installing Linux in WSL
1 General Information
Links
Documentation
- WSL Installation Guide
- WSL Environment Setup
- Systemd Support in WSL
- WSL Configuration
- WSL Guide by Mike Royal
2 Installation of Distributions
WSL + Ubuntu
- Install WSL:
wsl --install
This command:
- Includes additional WSL components and virtual machine platforms.
- Downloads and installs the latest version of the Linux kernel.
- Sets WSL 2 as the default environment.
- Downloads and installs the Ubuntu Linux distribution.
You will need to restart your computer during installation.
Fedora
- Repository: Fedora-WSL
- Microsoft Store: Fedora WSL
Install from Microsoft Store. You will need to restart your computer during installation.
Arch
Install from Microsoft Store. You will need to restart your computer during installation.
3 Initial Setup
Once the installation is complete, you will be prompted to create a username and password for your Linux distribution. Each Linux distribution has its own username and password and is not associated with the Windows username.
4 Systemd Support
Ensure WSL version is 0.67.6 or later:
wsl --version
In the Linux console, switch to superuser:
sudo -i
Open the file for editing /etc/wsl.conf
vi /etc/wsl.conf
Activate systemd:
[boot]
systemd = true
From the Windows console, stop WSL execution:
wsl.exe --shutdown
After restarting WSL, check that systemd is working:
systemctl list-unit-files --type=service
5 Installation of basic software
In the Linux console, switch to superuser:
sudo -i
Fedora
Update the system:
dnf -y update
dnf -y install vulkan tmux mc bash-completion evince kitty libreoffice
// Arch works the same way except use pacman -Syu