Installing Ubuntu in WSL is Now Much Easier (New Tar-based Format)
Recently, installing Ubuntu in WSL has become very easy. You may also like to install the Linux operating system alongside the Windows operating system. Installing various Linux distributions on Windows used to be difficult. But today, it is easy to install various Linux distributions, including Ubuntu, in a Windows environment. In this article from Orcacore, we will teach you how to install Ubuntu in WSL with a new tar-based format. This method simplifies the process of installing Ubuntu in WSL, offering a streamlined approach for users.
Prerequisites for Enabling WSL on Windows

To install Ubuntu in WSL, you must first meet the WSL activation prerequisites so that you do not encounter problems. Note that WSL is not activated on Windows 10 or lower. Therefore, to run WSL, your operating system must be Windows 10 or Windows 11 and 64-bit architecture. These requirements are essential for a smooth experience when installing Ubuntu in WSL.
– In Windows 10, Home and Pro editions must be version 21H1 (build 19043) or higher, also, in Enterprise and Education editions, version 20H2 (build 19042) or higher.
– In Windows 11, all Education, Enterprise, Pro, and Home editions must be Version 21H2 or higher.
– Your system RAM must be at least 4 GB.
– Make sure that your Virtualization (processor virtualizer) is Enabled. To do this, hold down the Ctrl+Shift+Esc keys at the same time. Then enter the Performance tab and look for the phrase Virtualization in the CPU section. If it is Disabled, you must enable it in your system’s BIOS section.
– To enable, restart your system and repeatedly click on F12 (depending on the type of laptop or system you have, it may be a different button) to enter the BIOS. Look for one of the Advanced, Configuration, or Advanced BIOS Features options. Then look for one of the Virtualization Technology, Virtualization, or Intel (R) Virtualization Technology options (depending on the type of your system, this option may be different) and Enable it.
– We recommend that you install the latest version of WSL, WSL 2.4.8 or higher, on your Windows system.
How to Install WSL on Windows?
If WSL is not already installed on your Windows, you can follow the steps below.
-You need to Open PowerShell as Administrator:

– Run the following command to install WSL:
wsl --install
Note that if you are using an older version of Windows, you can run the following command. In the command below, you need to replace <mark>XXXX </mark>
with your Windows drive letter.
dism.exe /Online /Enable-Feature /FeatureName:Microsoft-Windows-Subsystem-Linux /All /LimitAccess /Source:wim:<mark>XXXX</mark>:sourcessxs
Now it’s time to restart the computer once.
*Tips: You also learn about WSL 2 by visiting this guide on Install WSL2 on Windows 11 and Windows 10.
To install Ubuntu in WSL, First, you need to download an Ubuntu tarball from the official Ubuntu website . To do this, select the desired version and architecture (such as amd64 for 64-bit).
Download the tar.gz file, e.g.,
ubuntu-22.04-server-cloudimg-amd64-disk-kvm.img.
If you downloaded the .img file, you will need to convert it to a tarball format at this point. So you can use tools like 7-Zip or tar to do this.
– Open PowerShell again.
– Go to the directory where your tarball is located by running the following command:
tar -xvzf <<mark>your-tarball</mark>.tar.gz
Finally, you can use the following command to import the extracted Ubuntu root filesystem into WSL.
It is interesting to note that you can replace <mark><DistroName></mark>
with the name you want for your WSL distribution in the following command. This will specify the path to the extracted folder:
wsl --import <DistroName> <InstallLocation> <PathToTarball>
Example:
wsl --import Ubuntu-22.04 C:WSLUbuntu-22.04 C:pathtoyourextractedrootfs.tar
Well done! Start the Ubuntu distribution by running the following command:
wsl -d <DistroName>
Conclusion
In this article, you were taught the steps of installing Ubuntu in WSL. By following the steps mentioned in this tutorial carefully, you can easily install your desired distribution on Windows and enjoy using it alongside Windows. This tar-based method offers a relatively straightforward approach for installing Ubuntu in WSL.
Also, you may like to read the following articles:
Ubuntu 24.04 Run Tesseract OCR
PHP ionCube Loader For Ubuntu 24.04
Install Wireshark Ubuntu 24.04
Find Free Space Ubuntu 24.04
Ubuntu Core 24 by Canonical
Alternative Methods for Installing Ubuntu in WSL
While the tar-based format offers a good method for installing Ubuntu in WSL, there are alternative approaches that users can explore, depending on their preferences and technical skills.
1. Using the Microsoft Store
The easiest way to install Ubuntu, and other Linux distributions, on WSL is directly through the Microsoft Store. This method abstracts away much of the command-line interaction and offers a user-friendly experience.
Explanation:
The Microsoft Store provides pre-built, officially supported Ubuntu distributions that can be installed with a single click. This approach automatically handles the download and installation process, including setting up the necessary WSL components. It’s ideal for users who prefer a graphical interface and want a quick and hassle-free installation. The main advantage is simplicity; the Microsoft Store handles most of the complexities behind the scenes.
Steps:
- Open the Microsoft Store application on Windows.
- Search for "Ubuntu".
- Choose the desired Ubuntu version (e.g., Ubuntu, Ubuntu 22.04 LTS).
- Click "Install".
- Once installed, click "Open" to launch the Ubuntu terminal.
- The system will prompt you to create a username and password for your Ubuntu installation.
No code example is needed for this method as the installation is done through a graphical interface. The initial configuration of the username and password is also interactive within the newly opened terminal.
2. Utilizing the wsl --import
command with a different download source
While the original article focuses on downloading a tarball from the official Ubuntu website, you could also use a pre-built image from a different source, like a custom-built image or one shared within a development team. This still utilizes the wsl --import
command but gives more flexibility over the base image.
Explanation:
This method is useful when you need a specific configuration or set of pre-installed packages in your Ubuntu environment. Instead of starting with a clean Ubuntu image from the official website, you can use a customized tarball. This saves time and ensures consistency across multiple installations. It allows for the distribution of tailored Ubuntu environments pre-configured for specific tasks.
Steps:
- Obtain a Custom Tarball: Acquire the desired Ubuntu tarball from your alternative source. This might be a file shared by a colleague or a custom image you’ve created yourself. Let’s assume the file is named
custom-ubuntu.tar.gz
. -
Extract the Tarball (if necessary): If the image is compressed (e.g.,
.tar.gz
), extract it using a tool like 7-Zip or thetar
command in PowerShell.tar -xvzf custom-ubuntu.tar.gz
This command extracts the contents of
custom-ubuntu.tar.gz
into a folder. -
Import the Image into WSL: Use the
wsl --import
command to import the extracted root filesystem into WSL. Replace<DistroName>
,<InstallLocation>
, and<PathToTarball>
with your desired values.wsl --import CustomUbuntu C:WSLCustomUbuntu C:pathtoyourextractedrootfs.tar
In this example:
CustomUbuntu
is the name you’ll give to your WSL distribution.C:WSLCustomUbuntu
is the directory where the distribution’s files will be stored.C:pathtoyourextractedrootfs.tar
is the path to the extracted tarball. Note that if you did not manually create a tar file from the extracted files, you’ll need to do so. You can use the following command:tar -czvf rootfs.tar.gz <path to extracted directory>
-
Start the Distribution: Start the Ubuntu distribution using the following command:
wsl -d CustomUbuntu
These alternative methods offer different approaches to achieving the same goal: running Ubuntu within WSL. The Microsoft Store method prioritizes simplicity, while utilizing custom tarballs provides greater flexibility and control over the Ubuntu environment. Choosing the best method depends on the user’s technical expertise and specific requirements.