Introduction
Windows Subsystem for Linux 2 (WSL2) is a compatibility layer for running Linux binary executables natively on Windows 11. If you're already using WSL2 with Ubuntu 20.04 and 22.04, you might want to install Ubuntu 24.04 for the latest features. However, some users have reported that the installation process never completes. This article aims to help you troubleshoot and complete the installation of Ubuntu 24.04 on Windows 11 using WSL2.
Prerequisites
Before proceeding with the installation, ensure that your system meets the following requirements:
- Windows 11 21H2 or later version
- WSL2 enabled and installed
- Two or more existing WSL2 Linux distributions installed
Installing Ubuntu 24.04
Open PowerShell as an administrator and run the following command:
wsl --install --distribution Ubuntu-24.04
A new terminal window should open. If it doesn't, you can manually create a new Ubuntu 24.04 distribution using the following command:
wsl --install --download --accept-EULA --distribution Ubuntu-24.04
Once the installation begins, it may take some time to complete. However, if the installation never finishes, follow the steps below:
Troubleshooting
Step 1: Check the WSL Logs
Open PowerShell as an administrator and run the following command:
wsl --verbose
Look for any error messages related to the installation of Ubuntu 24.04. If you find any errors, try to resolve them before proceeding.
Step 2: Manually Initialize the Distribution
Open PowerShell as an administrator and run the following commands:
wsl --unregister Ubuntu-24.04
wsl --import Ubuntu-24.04 /mnt/wsl/Ubuntu-24.04 /mnt/wsl/Ubuntu-24.04 /mnt/wsl/Ubuntu-24.04/ubuntu.exe --accept-EULA
This should initialize the Ubuntu 24.04 distribution manually.
Step 3: Set the Default Distribution
Open PowerShell as an administrator and run the following command:
wsl --set-default-version 2
This sets WSL2 as the default version for your system.
Step 4: Restart Your System
Restart your system to ensure that the changes take effect.
Step 5: Verify the Installation
Open a new terminal window and run the following command:
wsl --list --verbose
Look for "Ubuntu-24.04" in the list of distributions. If it's not there, repeat the installation process.
Summary
In this article, we covered the process of installing Ubuntu 24.04 on Windows 11 using WSL2. We also discussed some troubleshooting steps if the installation process never completes. If you follow these steps carefully, you should be able to install Ubuntu 24.04 on your Windows 11 system.