How to Install Ubuntu 24.04 on WSL in Windows

Ubuntu 24.04 is one of the latest releases and distributions of Linux. To run Ubuntu 24.04 on Windows, you can either use WSL or a virtual machine. However, running a different virtual machine uses more system resources.

Thus, WSL is better for basic Ubuntu 24.04 use.

This blog demonstrates how to install Ubuntu 24.04 on WSL in Windows.

How to Install Ubuntu 24.04 on WSL?

WSL is referred to as the Windows Subsystem for Linux. It offers support for Linux distributions on Windows.

To install Ubuntu 24.04 on WSL in Windows, go through the below steps:

Step 1: Enable WSL Windows Feature

First, launch the “Windows Feature turn on or off” settings via the Start menu:

launching windows features on or off settings

Enable the “Virtual Platform” and “Windows Subsystem for Linux” checkboxes and hit the “OK” button:

enabling wsl and virtual platform features on windows

Now, restart the system to configure new settings:

restarting the system to configure changes on windows

Step 2: Update WSL

To update the WSL, download the “wsl_update_x64.msi” file.

Next, launch the Downloads directory and execute the file “wsl_update_x64.msi” to update WSL. Then, hit the “Finish” button:

updating wsl on windows

Step 3: Launch Windows PowerShell

Launch the Windows PowerShell as Administrator from the Startup menu:

launching windows powershell as administrator on windows

Step 4: Set WSL Default Version 2

Set the WSL default version as “2” using:

wsl --set-default-version 2
setting wsl default version 2

Step 5: List Available Linux Distro Images on WSL

Next, list the available Linux distro images that can install the required Linux distribution via:

wsl -l --online
listing available linux distribution using wsl -l --online command

Step 6: Install Ubuntu 24.04 on WSL

Now, install Ubuntu 24.04 on WSL in Windows through the following command:

wsl --install -d Ubuntu-24.04
installing ubuntu 24.04 using wsl --install -d ubuntu-24.04

Step 7: Set New User

The Ubuntu 24.04 terminal will run directly after installation and prompt you to create a new user. Set the new username and password:

setting new user for ubuntu 24.04

Step 8: Verification

For verification, view the information about installed Linux Distribution:

lsb_release -a

The output shows that we have effectively installed Ubuntu 24.04 on WSL in Windows:

viewing installed distribution information using lsb_release

Step 9: Update and Upgrade Ubuntu 24.04 Packages

Update and Upgrade the Ubuntu 24.04 Package through:

sudo apt update && sudo apt upgrade
updating and upgrading ubuntu 24.04 packages

To sum up, first enable the WSL on Windows. Then, install Ubuntu 24.04 on WSL using the “wsl –install -d Ubuntu-24.04” command.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top