Install Windows Linux Subsystem 2 (easy)

With just one command you can run a Linux under current versions of Windows 10 & Windows 11.

Introduction to WSL

Are you using Windows 10 or 11 at the latest feature and patch level? Microsoft recommends version 19041 for Windows 10 or Windows 11. Then you can really use the Windows Linux Subsystem 2 with a command line.

If you follow the Microsoft documentation and execute the command “wsl -install” without parameters, Ubuntu will also be installed.

But let’s first see which distributions are available to us. To do this, execute the following command.

wsl -l --online
Windows Linux Subsysteme – Distributionen that can be installed
Windows Linux Subsysteme – Distributionen that can be installed

Install Ubuntu 24.04

We decide to use Ubuntu 24.04 and therefore use this command.

wsl --install -d Ubuntu-24.04

The installation should now take two to twenty minutes, depending on the hardware.

With Screen to Gif I also have a little video for you.

WSL Installer
WSL Installer

If you now receive an error message, you should check whether virtualization is switched on in the bios. For example, I received the following error message:

image 9
WslRegisterDistribution failed with error: 0x80370102

When you fixed your issues, start Ubuntu again via the Windows 11 start menu and choose an account and password. These are different from your Windows Passwords, so document them carefully.

Test Windows Linux Subsystem in Terminal

Now we have a fully functional Linux Ubuntu Client presenting us with a Bash connected to the network. This is handy for secure SSH connections, testing with Linux or just to use your favorite troubleshooting environment.

Open the terminal and you can now choose a Ubuntu 24.04 option and i.e. use the ping command the Ubuntu 24.04 style.

WSL - Linux Ubuntu Bash in Terminal
WSL – Linux Ubuntu Bash in Terminal

Conclusion

I am a huge fan of running Azure Cloud Shell, Ubuntu Bash, PowerShell and CMD in one screen. Each OS has advantages and features to use, that can be easier used or provide more information.

My orginal version was posted here and check here how to start using Winget. My dev script to setup my dev workstation includes the necessary components already.

Spread the knowledge
Avatar for Andreas Hartig
Andreas Hartig - MVP - Cloud and Datacenter Management, Microsoft Azure

Related Posts

Technitium DNS Server on Windows

Homelab – Build a robust DNS foundation – Part 2 using Technitium DNS Server on Windows

Let’s build a better version of a Technitium DNS Server on Windows. A while back i wrote a DNS guide to help you get started in your homelab. This guide…

Spread the knowledge
Read more
Tinyproxy and a dragon IT architect from the shadowrun world looking at a large screen with graphs on it

Tinyproxy on Hyper-V – new Ubuntu 24.04

A Linux VM with Proxy, such as tinyproxy, can be used to reduce bandwidth as it caches frequently requested websites. Today we want to configure a Linux VM with a Proxy and deploy…

Spread the knowledge
Read more
COM Port Management and a dragon IT architect from the shadowrun world looking at a com port and a manufacturing floor

Windows – easy COM Port Management without Admin Rights with Windows 10 & 11

COM Port Management with no administrator rights is a challenge. You might have noticed that I am currently involved in IT and OT discussions. During OT modernization, I encountered a…

Spread the knowledge
Read more
Remote Desktop Connection Manager (RDCM) – A Must Have for Homelabs and a dragon IT architect from the shadowrun world looking at his computer monitor without humans

Remote Desktop Connection Manager (RDCM) – A Must-Have for Homelabs

Managing multiple remote connections efficiently is a challenge for IT professionals and homelab enthusiasts alike. Remote Desktop Connection Manager (RDCM) simplifies this process by providing a centralized interface for organizing…

Spread the knowledge
Read more
IT Architect dragon from the shadowrun universe with USB Stick and Rufus theme

Windows Server 2025 – Create bootable USB drives the easy way

To get started with Windows Servers 2025 you need to create a bootable USB drive. This normally is done on a USB Stick. To create a bootable USB Device and…

Spread the knowledge
Read more
A dragon IT Architect in the shadowrun world using an Excel document and the Azure Quick Review Tool

Azure Quick Review 2.04 – High Level Assessments

With Azure Quick Review (azqr) you can quickly make a High Level Assessment of an “Azure Subscription” or “Resource Group”. Installation of Azure Quick Review You can download the files…

Spread the knowledge
Read more