
Microsoft introduced the Windows Subsystem for Linux to make it easy for users to run Linux OSes such as Ubuntu and issue Bash commands directly from the Windows command prompt interface. Windows Subsystem for Linux (WSL) is a feature of Windows that allows developers to run a Linux environment without the need for a separate virtual machine or dual booting. Both Windows 10 and Ubuntu are operating systems. The software package known as the operating system controls the computer by managing the hardware and software instructions. Windows was first introduced in Windows in 1985. In this guide, you will learn how to install Ubuntu 20.04 LTS on Windows via WSL.
Windows has remained a well-known operating system since its inception. It has undergone a great deal of improvisation, and the fact that it is the operating system of choice for the majority of personal computers indicates how popular it has become. You can read more related guides on Linux by checking out the following posts: How to Switch between Users in Linux , How to Add a User to the Sudoers List in Linux, and a brief Introduction to Linux and how to create disk partition in Ubuntu Linux.
Microsoft released the first Windows 11 preview build and SDK to Windows Insiders on June 28, 2021, and later announced that Windows 11 would debut on October 5, 2021, on August 31st, 2021. Following the release, Windows 11 has remained the Operating System of choice for Windows Users.
Installing Ubuntu on Windows 11
To install Ubuntu on Windows 11, follow the below steps: Please refer to these related guides also: How to Create Symbolic Links in Linux and How to Set Special File Permissions in Linux using SUID, GUID, and Sticky Bit
Step 1 – Turn on WSL – Windows Subsystem for Linux
To do this, navigate to the control panel session with the appwiz.cpl
command by pressing the Windows Key + R together.

This opens the Control Panel window will open and take you directly to the all programs page. From the left-hand side of the screen, click on "Turn Windows Features on or off"

The Turn Windows features on or off screen will open up, scroll to where you have Windows Subsystem for Linux and check the dialog box beside it,

Click on Okay, and then restart your PC for the changes to take effect.


Step 2 – Install Ubuntu from Microsoft Store
Search for the Microsoft store using the search bar icon on your Windows taskbar.

When you’re on the store page, search for Ubuntu 20.04.5 LTS

Click on get and then open after the downloads.


On opening it, the application will through an error similar to the one shown below:

Step 3 – Update the WSL2 Kernel Components
To resolve the above error, we need to update the WSL 2 Kernel’s component. Click here to download the latest version of the WSL component.
You can check your system type by running the below command to confirm your system type if you’re not sure of it:
systeminfo | find "System Type"

Check your download folder to locate the WSL 2 download you carried out previously:

Double-click on the setup file to install it and click Next

When prompted for user access permission, click on Yes to continue and then click on Finish to complete the installation.


Step 4 – Launch Ubuntu
To complete the Ubuntu installation, relaunch Ubuntu 20.04.5 LTS application installed previously by searching and clicking on the name and to open it:

A console window will open the first time you run a newly installed Linux distribution, and you’ll be instructed to wait a few minutes while files decompress and are stored on your computer.
Step 5 – Set the Default Unix User
The next thing to do is to enter the name of the new Unix user to complete the installation

Step 6 – Update System Packages
Optionally, you can go ahead and run the sudo apt update
command to update the system packages to get your Ubuntu 20.04.5 LTS set for use.

Installing Windows Terminal
Installing a Windows terminal is an optional step but it will help you to launch your Linux Distribution within your Windows Command prompt terminal. With a Windows terminal, you can open numerous tabs or window panes in the Windows Terminal to display and rapidly move between various Linux distributions or other command lines (PowerShell, Command Prompt, Azure CLI, etc). Your terminal can be completely customized with different colour schemes, font styles, sizes, custom keyboard shortcuts, and background images.
To install Windows Terminal, search for it on the Microsoft Store on your PC. Click on get to download it and then click on open to open it after the installation.


You will be able to switch tabs rapidly and move between various Linux distributions or other command lines (PowerShell, Command Prompt, Azure CLI, etc)

In this guide, you have learned how to install Ubuntu 20.04 LTS on Windows via WSL.
Summary
Having Ubuntu or any other Linux distribution installed directly on your Windows PC is a great way to switch between Windows and Linux OS easily without having to install a virtualization tool like Oracle Virtualbox or VMWare. It’s also a good way to master your Linux command skills on a daily basis.
I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.