Simplified Ubuntu Installation on WSL with Tar-Based Format

The way we use Ubuntu on Windows Subsystem for Linux (WSL) is evolving, offering a more streamlined experience. Microsoft has pioneered a new method for packaging and installing WSL distributions using tar files, with Ubuntu leading the charge. With WSL version 2.4.8 and later, you can now install Ubuntu on WSL directly from a tar file, bypassing the Microsoft Store.

Microsoft’s new tar-based distribution architecture enables direct installation from a tar archive, eliminating the need for Windows-specific packaging via the Microsoft Store. This simplifies the process of using, customizing, and managing Ubuntu on Windows.

What’s Changing?

Previously, WSL distributions like Ubuntu were installed using appx packages obtained through the Microsoft Store. This has transitioned to a tar file approach. A tar file is essentially a compressed archive containing all the necessary Ubuntu files. This new methodology enhances flexibility and provides greater control over the installation process.

Benefits

This transition offers several advantages:

  • Easier Installation: Install Ubuntu directly from a tar file, eliminating the need for the Microsoft Store. This also removes the necessity for Windows-specific code when creating a WSL distro.

  • Customization: Greater flexibility to modify the Ubuntu image, beneficial for projects requiring specific setups.

  • Business Advantages: Host Ubuntu images on a private network, ensuring controlled distribution and consistent setups for all users, thereby improving security.

  • Increased Control: Automate much more of the setup procedure using commands, and define the distribution name and install location.

  • Improved error messages: The new architecture also means that error messages are more descriptive.

How to Install Ubuntu WSL Instance from tar File?

Ubuntu is now available in Microsoft’s new WSL distribution format, making it straightforward to get started.

Here are a few ways to install Ubuntu on WSL using the new tar-based format.

Method 1: Install Ubuntu Using a .wsl file

Step 1: Locate the .wsl file for your desired Ubuntu version. This file should be provided by Ubuntu or a trusted source.

Step 2: Simply double-click the .wsl file to initiate the installation. The WSL infrastructure will handle the rest.

Method 2: Install Ubuntu Using Command Line (with tar File)

Step 1: Make sure you have WSL version 2.4.8 or higher installed on your Windows system.

Step 2: Open PowerShell.

Step 3: Use the following command, replacing ubuntu.tar.wsl with the actual filename:

wsl --install --from-file ubuntu.tar.wsl

Method 3: Install Ubuntu Using Command Line (Default Install)

Step 1: Make sure you have the latest version of WSL. You need WSL 2.4.8 or higher version installed on your Windows system.

Step 2: Open PowerShell.

Step 3: Run the following command:

wsl --install ubuntu

What About the Old Method?

If you prefer installing Ubuntu via the Microsoft Store, it’s still a viable option. Similarly, the command wsl --install -d <DistroName> remains functional. The tar-based system provides an additional method, offering greater flexibility.

More Distributions will Adapt this New Format

While Ubuntu is among the first to utilise this new architecture, it’s highly probable that more distributions will embrace the new tar-based WSL distribution format in the future.

Here’s why we can expect more distributions to follow:

  • New Architecture:
    The tar-based approach creates and distributes WSL distributions without relying on Windows-specific code or the Microsoft Store, making it easier for any Linux distribution to package itself for WSL.

  • Red Hat Support:
    Red Hat has adopted the new tar-based architecture and delivers a Red Hat Enterprise Linux (RHEL) WSL distro image. This indicates that major distributions recognize the value in this approach.

  • Easier Customisation & Deployment:
    The new format simplifies the customisation, deployment, and management of WSL distributions, benefitting individual users and enterprises alike.

  • No Appx Package:
    Users can create a WSL distro without writing Windows code, which was required by the previous appx package method, increasing accessibility for any distribution.

  • General Availability:
    The new tar-based architecture is not exclusive to Ubuntu but is a general update to WSL distro packaging and installation, indicating broader applicability.

  • Importing Custom Distros:
    Importing custom Linux distributions using tar files is easier, combined with the benefits of the new architecture, encouraging more custom and official distributions being used on WSL.

  • Community Driven:
    Creating a WSL distro using only Linux tools and without Microsoft Store reliance could spur more community-driven distributions.

  • Microsoft’s Aim:
    Microsoft intends for the new tar-based architecture to be the default experience for existing and future distributions, indicating a shift towards wider adoption.

So, the shift to a tar-based architecture significantly benefits both users and distribution maintainers. With major players like Ubuntu and Red Hat already onboard, more Linux distributions will likely become available via this method in the future.


The tar-based installation method offers a more flexible and streamlined approach to using Ubuntu on WSL. As more distributions adopt this format, users can expect an even greater selection of Linux environments within Windows.