Tools: How to Set Up WSL2 on Windows 11

Tools: How to Set Up WSL2 on Windows 11

Prerequisites

Step 1 — Open PowerShell as Administrator

Step 2 — Install WSL2

Step 3 — Restart Your Machine

Step 4 — Finish the Linux Setup

Step 5 — Verify WSL2 is Running

Step 6 — Update the Distro

Step 7 — Install Windows Terminal (if you haven't already)

Useful Commands to Know

Accessing Files Between Windows and Linux

Troubleshooting

What's Next Windows 11 ships with WSL2 support built in — no manual kernel updates, no legacy workarounds. This is the cleanest path to a Linux environment on Windows I've seen so far. Right-click the Start button → Terminal (Admin) or search for PowerShell, right-click → Run as administrator. You'll need this for the install command to work. One command does everything — enables the WSL feature, sets version 2 as default, and installs Ubuntu as the default distro: If you want a specific distro instead of Ubuntu, use wsl --install -d <DistroName>. Run wsl --list --online to see what's available. WSL2 requires a reboot to finish the setup. Save anything open and restart. Or just restart manually from the Start menu. After reboot, Ubuntu (or whichever distro you picked) will launch automatically and ask you to create a user account: Pick a username and a password. The password won't show as you type — that's normal. Once done you'll land at the shell prompt: Open a new PowerShell window and check: The VERSION 2 confirms you're on WSL2, not the older WSL1. The * marks your default distro. First thing after a fresh install — update the package list: Takes a minute or two. Do it now and you won't have to think about it again for a while. WSL2 works fine in the default console but Windows Terminal is significantly better — tabs, split panes, profiles per distro, proper font rendering. Install it from the Microsoft Store or: Once installed, open it and your Linux distro will already be listed as a profile in the + dropdown. From inside WSL2, your Windows drives are mounted under /mnt/: From Windows Explorer, type this in the address bar to browse your Linux filesystem: Or just run explorer.exe . from inside your WSL2 terminal to open the current folder in Explorer. wsl --install says WSL is already installed but nothing works Stuck on "Installing" after reboot Error: 0x80370102 — virtualization not enabled WSL1 instead of WSL2 showing in wsl -l -v Tested on Windows 11 23H2. If something looks different on your machine, the WSL docs at aka.ms/wsl are actually pretty good. Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse

Code Block

Copy

wsl --install wsl --install wsl --install Installing: Virtual Machine Platform Virtual Machine Platform has been installed. Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed. Downloading: WSL Kernel Installing: WSL Kernel WSL Kernel has been installed. Downloading: Ubuntu The requested operation is successful. Installing: Virtual Machine Platform Virtual Machine Platform has been installed. Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed. Downloading: WSL Kernel Installing: WSL Kernel WSL Kernel has been installed. Downloading: Ubuntu The requested operation is successful. Installing: Virtual Machine Platform Virtual Machine Platform has been installed. Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed. Downloading: WSL Kernel Installing: WSL Kernel WSL Kernel has been installed. Downloading: Ubuntu The requested operation is successful. Restart-Computer Restart-Computer Restart-Computer Enter new UNIX username: localadmin New password: Retype new password: passwd: password updated successfully Enter new UNIX username: localadmin New password: Retype new password: passwd: password updated successfully Enter new UNIX username: localadmin New password: Retype new password: passwd: password updated successfully localadmin@MACHINE-NAME:~$ localadmin@MACHINE-NAME:~$ localadmin@MACHINE-NAME:~$ NAME STATE VERSION * Ubuntu Running 2 NAME STATE VERSION * Ubuntu Running 2 NAME STATE VERSION * Ubuntu Running 2 sudo apt update && sudo apt upgrade -y sudo apt update && sudo apt upgrade -y sudo apt update && sudo apt upgrade -y winget install Microsoft.WindowsTerminal winget install Microsoft.WindowsTerminal winget install Microsoft.WindowsTerminal ls /mnt/c/Users/ ls /mnt/c/Users/ ls /mnt/c/Users/ \\wsl$\Ubuntu \\wsl$\Ubuntu \\wsl$\Ubuntu - Windows 11 (any edition — Home, Pro, Enterprise) - A user account with Administrator privileges - Internet connection for downloading the distro - Run wsl --update to make sure the kernel is current - Then wsl --shutdown and try again - Open the Microsoft Store and check for pending updates — the Ubuntu app sometimes needs to finish installing from there - Reboot into BIOS/UEFI and enable Intel VT-x or AMD-V (virtualization) - On most machines it's under Advanced → CPU Configuration - Set the default version: wsl --set-default-version 2 - Convert an existing distro: wsl --set-version Ubuntu 2 - Install a Debian instance alongside Ubuntu - Set up Git with SSH keys in WSL2