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

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
A dragon IT Architect in the shadowrun world using Microsoft Tools like Windows LAPS to secure his datacenter, relaxing and watching a sitcom on TV

Securing Local Administrator Accounts with Windows LAPS: A Get Started Guide for Windows Server Environments

Managing local administrator accounts securely is a critical aspect of maintaining a robust and secure IT environment. With the introduction of the Windows Local Administrator Password Solution (LAPS) in newer…

Spread the knowledge
Read more
A dragon IT Architect in the shadowrun world using his notebook and keepassxc to safe the world from a virus attack

Securing Client Passwords with KeePassXC: A Consultant’s Guide to Autotyping and More

As consultants, managing multiple clients and their respective passwords can be a daunting task, especially when security is paramount. In this article, we will explore how KeePassXC, a powerful and…

Spread the knowledge
Read more
Windows Server 2025 Monitoring TCP/IP on http://hartiga.de

Windows Server 2025 – Monitoring TCP/IP

Monitoring open TCP/IP ports is crucial for maintaining the security and functionality of your Windows system. This article will guide you through using three powerful tools, netstat, powershell Get-NetTCPConnection and…

Spread the knowledge
Read more
Windows Admin using Winget

Easily manage Applications with WinGet v1.x

Microsoft has released WinGet, a package manager that is very well suited for installing and updating third-party applications. We are now installing applications with “WinGet” and learn how to manage…

Spread the knowledge
Read more
SFTP with Powershell Logo

Use SFTP with Powershell

If you want to use SFTP with Powershell to transfer files, you can do this with the Posh-SSH module. Installation of SFTP with Powershell To retrieve or copy data via…

Spread the knowledge
Read more