Setting Up WSL on Windows 11: A Comprehensive Guide

Requirements

Guide to setup WSL

Enabling WSL

In the possibility that you do not have WSL enabled by default. I’ve listed a command below that can be run through an elevated PowerShell to enable that environment/program.

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

or

wsl –install (If you see WSL help text try and run wsl –list –online)

Enabling WSL Version 2

Restart your computer, sign back into your machine, and open another elevated Powershell prompt. Once open again run the command below.

wsl --set-default-version 2

WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel.

If you are are promted with the above message. Open this link -> WSL Kernel. Download and install the WSL kernel. Once the kernel is downloaded and installed run wsl --set-default-version 2 again.

Installing your favorite linux distribution

With Powershell 7 still open in admin mode run the command to change your distro

Run wsl –list –online before the below command so you can decide which distro you want to run virtually on your system.

wsl –install -d <Distribution Name> (Replace with the name of the distribution you would like to install.)




Leave a Reply

Your email address will not be published. Required fields are marked *