Resource Center
7 min read
TagsGeneralLearning

Ubuntu Installation on Windows Using WSL 2: A Simple Step-by-Step Guide

ST School Team

August 19, 2026

0
Ubuntu Installation on Windows Using WSL 2: A Simple Step-by-Step Guide

Introduction

Ubuntu is one of the most popular Linux distributions used by developers. It is commonly used for software development, servers, cloud computing, DevOps, Docker, and many other technologies.

If you are using Windows, you don't necessarily need to remove Windows or create a dual-boot setup to use Ubuntu.

Windows provides a feature called WSL (Windows Subsystem for Linux) that allows you to run Ubuntu directly inside Windows.

In this blog, we will understand what WSL is, why developers use Ubuntu on Windows, and how to install Ubuntu 24.04 LTS using WSL 2 step by step.


1. What is Ubuntu?

Ubuntu is a Linux distribution based on Debian.

It provides a Linux operating system environment that developers can use for writing and running applications.

Ubuntu is widely used for:

  • Software development
  • Python and Django development
  • FastAPI development
  • Web servers
  • Cloud computing
  • DevOps
  • Docker
  • Linux administration

For example, if you are learning Python, you can install Python and run your applications directly inside Ubuntu.

 
 
Ubuntu
   ↓
Python
   ↓
Django / FastAPI
   ↓
Your Application
 

2. Can We Install Ubuntu on Windows?

Yes.

Traditionally, if someone wanted to use Linux and Windows on the same computer, they might use dual boot, where both operating systems are installed separately.

But Windows provides a simpler option called:

Windows Subsystem for Linux (WSL)

With WSL, you can run a Linux distribution such as Ubuntu directly from Windows.

You don't need to:

  • Remove Windows
  • Create a separate partition
  • Set up traditional dual boot

The basic setup looks like:

 
 
Windows
   ↓
WSL 2
   ↓
Ubuntu
 

3. What is WSL?

WSL stands for Windows Subsystem for Linux.

It allows you to run a Linux environment inside Windows.

You can open Ubuntu from Windows and use Linux commands such as:

 
 
ls
cd
pwd
mkdir
sudo
apt
 

You can also install development tools and run applications inside Ubuntu.

For example:

 
 
python --version
 

or:

 
 
git --version
 

This makes WSL very useful for developers who use Windows but want access to a Linux development environment.


4. What is WSL 2?

There are different versions of WSL, but WSL 2 is the modern version and is commonly recommended for development.

WSL 2 provides a more complete Linux environment and is also commonly used by tools such as Docker Desktop.

Our setup looks like:

 
 
Windows
   ↓
WSL 2
   ↓
Ubuntu 24.04 LTS
 

For our Docker installation, we also used this same WSL 2 setup.


5. Check Whether WSL is Already Installed

Before installing Ubuntu, we should check whether WSL is available.

Open PowerShell and run:

 
 
wsl --status
 

If WSL isn't installed, Windows will tell you that it needs to be installed.

You can install it using:

 
 
wsl --install
 

After installation, Windows may ask you to restart the computer.


6. Check Available Linux Distributions

Once WSL is installed, we can see which Linux distributions are available.

Run:

 
 
wsl --list --online
 

You may see options such as:

 
 
NAME
Ubuntu
Ubuntu-24.04
Ubuntu-22.04
Debian
Kali Linux
...
 

For this guide, we will use:

Ubuntu 24.04 LTS


7. Install Ubuntu 24.04 LTS

To install Ubuntu 24.04, run:

 
 
wsl --install -d Ubuntu-24.04
 

Windows will download and install Ubuntu.

You may see messages similar to:

 
 
Downloading: Ubuntu 24.04 LTS
Installing: Ubuntu 24.04 LTS
Distribution successfully installed.
 

Ubuntu will then start for the first time.


8. Create Your Ubuntu Username and Password

During the first launch, Ubuntu will ask you to create a Linux user.

You may see:

 
 
Create a default Unix user account:
 

Enter the username you want to use.

For example:

 
 
saicharan
 

Then Ubuntu will ask for a password:

 
 
New password:
Retype new password:
 

Important

When entering your password in the Linux terminal, nothing will appear on the screen.

You won't see:

 
 
*****
 

or any characters.

This is normal. Type the password and press Enter.

After confirmation, your Ubuntu user account will be created.


9. Open Ubuntu

Once Ubuntu is installed, you can launch it using:

 
 
wsl -d Ubuntu-24.04
 

You can also open Ubuntu from the Windows Start menu.

When Ubuntu starts, you will see a terminal similar to:

 
 
saicharan@SaiCharan:~$
 

This means you are now inside the Ubuntu environment.


10. Verify Ubuntu Installation

We can check the installed WSL distributions from PowerShell using:

 
 
wsl -l -v
 

Our system showed:

 
 
NAME            STATE           VERSION
Ubuntu-24.04    Running         2
 

The important part is:

 
 
VERSION
2
 

This confirms that Ubuntu is running using WSL 2.


11. Check the Ubuntu Version

Inside Ubuntu, you can check the Ubuntu version using:

 
 
lsb_release -a
 

You should see information indicating that you are using:

 
 
Ubuntu 24.04 LTS
 

This is useful when you want to confirm exactly which Ubuntu version is installed.


12. Basic Linux Commands

Now that Ubuntu is installed, you can start using basic Linux commands.

Check your current location

 
 
pwd
 

pwd shows the current directory.


List files

 
 
ls
 

This displays files and folders in the current directory.


Create a folder

 
 
mkdir myproject
 

This creates a folder called myproject.


Move into a folder

 
 
cd myproject
 

Move back

 
 
cd ..
 

Clear the terminal

 
 
clear
 

These are some of the basic commands you'll frequently use while working in Ubuntu.


13. Access Windows Files from Ubuntu

One useful feature of WSL is that Ubuntu can access your Windows drives.

For example, your Windows C: drive is available inside Ubuntu through:

 
 
/mnt/c
 

For example:

 
 
cd /mnt/c
 

You can then access Windows folders.

Your Windows user folder might be available through:

 
 
cd /mnt/c/Users/gsaic
 

This is why you may see a terminal location such as:

 
 
saicharan@SaiCharan:/mnt/c/Users/gsaic$
 

The /mnt/c directory represents your Windows C: drive.


14. Installing Software in Ubuntu

Ubuntu has a package manager called APT.

You can use it to install many software packages.

First, update the package information:

 
 
sudo apt update
 

Then you can install packages.

For example, to install Git:

 
 
sudo apt install git
 

You can also install other development tools depending on your requirements.

For example:

 
 
sudo apt install python3
 

The sudo command allows you to execute commands with administrator privileges.

Ubuntu may ask for your Linux password when using sudo.


15. WSL vs Virtual Machine vs Dual Boot

It's useful to understand the difference between these approaches.

MethodHow it works
Dual BootWindows and Linux are installed separately
Virtual MachineLinux runs inside virtualization software
WSL 2Linux environment runs directly through Windows' WSL system

For many Windows developers, WSL 2 is convenient because you can access Linux tools without leaving Windows.

For example:

 
 
Windows
 ├── Chrome
 ├── VS Code
 ├── PowerShell
 │
 └── WSL 2
      └── Ubuntu
 

You can work with both Windows and Linux tools on the same computer.


16. Ubuntu and Docker

WSL 2 is also important when working with Docker on Windows.

Our Docker setup looks like:

 
 
Windows
   ↓
WSL 2
   ↓
Ubuntu 24.04
   ↓
Docker Desktop
   ↓
Docker Engine
   ↓
Containers
 

This is one reason we installed Ubuntu and WSL 2 before setting up Docker Desktop.

However, Ubuntu is not required just to use every Docker feature on Windows. Docker Desktop manages much of the underlying setup for you.


17. Common Problems

WSL is not installed

If you see:

 
 
The Windows Subsystem for Linux is not installed.
 

run:

 
 
wsl --install
 

Then restart Windows if requested.


No Linux distributions are installed

If:

 
 
wsl -l -v
 

doesn't show Ubuntu, install it with:

 
 
wsl --install -d Ubuntu-24.04
 

Ubuntu isn't using WSL 2

Check:

 
 
wsl -l -v
 

If Ubuntu is showing version 1, you can convert it to WSL 2 using:

 
 
wsl --set-version Ubuntu-24.04 2
 

Then verify again:

 
 
wsl -l -v
 

Forgot your Ubuntu password

Your Ubuntu password is separate from your Windows password.

If you forget it, you can reset it using the WSL root account. This is a slightly more advanced recovery process, so it's better to keep your Linux password safely remembered.


18. Useful WSL Commands

Here are some useful commands you can remember.

Check WSL status

 
 
wsl --status
 

List installed distributions

 
 
wsl -l -v
 

List available distributions

 
 
wsl --list --online
 

Start Ubuntu

 
 
wsl -d Ubuntu-24.04
 

Shut down WSL

 
 
wsl --shutdown
 

Stop a specific distribution

 
 
wsl --terminate Ubuntu-24.04
 

These commands are enough for basic WSL management.


19. Complete Installation Process

The complete Ubuntu installation process can be summarized as:

 
 
Windows
   ↓
Check WSL
   ↓
Install WSL
   ↓
Restart if required
   ↓
Check available distributions
   ↓
Install Ubuntu 24.04 LTS
   ↓
Create Linux username
   ↓
Create Linux password
   ↓
Launch Ubuntu
   ↓
Verify WSL version
   ↓
Ubuntu Successfully Installed
 

Conclusion

Ubuntu is a popular Linux distribution used extensively in software development and server environments.

Windows users can run Ubuntu without dual booting by using Windows Subsystem for Linux (WSL).

The basic setup is:

 
 
Windows
   ↓
WSL 2
   ↓
Ubuntu 24.04 LTS
 

Once Ubuntu is installed, you can use Linux commands, install development tools, work with Python and other programming languages, and use tools such as Git and Docker.

For developers using Windows, WSL 2 + Ubuntu is a very useful environment to learn, especially if you are planning to work with backend development, Linux servers, cloud technologies, DevOps, or Docker.

And in our own setup, we successfully reached:

 
 
Ubuntu-24.04    Running    2
 

which confirms that Ubuntu 24.04 LTS is successfully installed and running on WSL 2.