Back to Blog
tutorialBeginner5 min read

Install Ubuntu WSL

This guide will provide instructions on how to install WSL on Windows 11

Windows 11 - Install Ubuntu WSL

Install Ubuntu

Windows 11 makes it extremely easy to install WSL and Ubuntu. Open up the Terminal by pressing WIN + x and then select "Terminal". Then paste in:

wsl --install --no-distribution

WSL Installation in PowerShell
WSL Installation in PowerShell

Reboot once the installation is complete.

Once WSL is installed, the available distros can be viewed with

wsl --list --online

WSL Available Distributions List
WSL Available Distributions List

I prefer to install Ubuntu 24.04 which is the latest version at the time. To install, run:

wsl --install -d Ubuntu-24.04

Install Updates

Once Ubuntu is installed a prompt will be displayed to provide a username and then password. Afterwards, Ubuntu will be logged in and should be updated. Paste in:

sudo apt update && sudo apt full-upgrade -y

Once complete, restart WSL with the following commands.

Exit Ubuntu

exit

Shutdown WSL

wsl --shutdown

Then start WSL back up with

wsl

Setting a Default Distro

If more than one distro is installed, it is possible to set the distro that is used as the default. First, list the installed distros:

wsl -l -v

Then set whichever one should be default

wsl --set-default <DISTRO>

Keep Ubuntu VM Running

If running into issues where the Ubuntu VM keeps shutting down (which was happening to me and closing all my Docker containers), consider configuring WSL to auto start.