Linux Windows

Install Ubuntu 20.04 LTS on Windows via WSL

Ubuntu-on-Windows

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.

Windows-Run-command

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"

Turn-on-or-off-windows-features
Turn Windows Feature 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,

Turn-windows-feature-on-or-off1
Enabling WSL

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.

Search-for-Microsoft-Store
Searching for Microsoft Store

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

Ubuntu-20.04.5LTS-from-Microsoft-Store
Searching 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:

First-Error-Update-the-Kernel
Error while Opening Ubuntu for the first time

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-system-type
Checking System type

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

Locate-the-WSL-download-file-in-the-download-folder-and-run-the-installtion
WSL Update Downloaded

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

Double-click-on-WSL-to-run-the-installation
Installing WSL2 Updates

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:

Installing-Ubuntu
Installing Ubuntu 20.04.5 LTS

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

Installation-is-successful
Entering the Username for the Unix User

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.

Update-system-packages
Updating System Packages

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)

Click-on-the-tab-pointer
Windows Terminal Screen

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.

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x