How to install WSL2 and Ubuntu on Windows

Mukul Srinivas

Mukul Srinivas

1 min read · August 3, 2023

WSL and Ubuntu on Windows

Pre-requisites:

  • Windows 10 or Windows 11 version 1903 or later
  • Administrator privileges

STEPS:

  1. Open PowerShell or Command Prompt as administrator.
    Powershell as a Admin

  2. Run the following command to enable WSL2:
    wsl --install
  1. Restart your computer.
  2. Run the following command to install Ubuntu:
    wsl –install -d Ubuntu
  1. Open the Microsoft Store and search for “Ubuntu.”

  2. Click on the “Ubuntu” app and click on “Install.”
  3. Once the installation is complete, open the “Ubuntu” app.
  4. You will be prompted to create a user account.
  5. Enter a username and password, and then click on “Create.”

  6. You will now be logged into your Ubuntu environment.
  7. To verify that WSL2 and Ubuntu are installed correctly, run the following command:
    wsl --list --verbose
  1. You should see the following output:
NAME   STATE  VERSION
Ubuntu  Running  2
  1. To start using Ubuntu, run the following command:
    wsl Ubuntu
  1. You will now be in a command prompt in your Ubuntu environment.
  2. You can start using Ubuntu by running any Linux command.

Congratulations! You have now successfully installed WSL2 and Ubuntu on Windows.

Additional Tips:

M

Written By Mukul Srinivas

Driven to share best tips, stories and reviews.

See All From Mukul Srinivas