Home Windows Subsystem for Linux (WSL) You Can Now Install Ubuntu on WSL Using the New Tar-Based Format

You Can Now Install Ubuntu on WSL Using the New Tar-Based Format

Ubuntu is now available in Microsoft’s new WSL distribution format.

By sk
681 views

The way we use Ubuntu on Windows Subsystem for Linux (WSL) is changing, and it's getting much simpler. Microsoft has introduced a new way to package and install WSL distributions using tar files, and Ubuntu is one of the first to take advantage of this. Starting from WSL version 2.4.8, it is possible to install Ubuntu on WSL from a tar file, without using the Microsoft Store.

Microsoft's new tar-based distribution architecture allows for direct installation from a tar file, which eliminates the need for Windows-specific packaging or the Microsoft Store. This means it's becoming easier to use, customise and manage Ubuntu on Windows.

What's Changing?

Previously, WSL distributions like Ubuntu were installed using appx packages through the Microsoft Store. Now, things are moving to a tar file system. Think of a tar file like a compressed folder that holds all the necessary Ubuntu files. This new method makes things more flexible and gives you more control.

Benefits

This change offers several benefits:

  • Easier to Install: You can now install Ubuntu directly from a tar file without going through the Microsoft Store. This also means you don't need to write Windows-specific code to create a WSL distro.
  • Customisation: You have more freedom to modify the Ubuntu image itself. This is great if you need a specific setup for your work or projects.
  • Better for Businesses: Companies can now host their own Ubuntu images on a network and control which ones are available. This helps with security and ensures everyone is using the right setup.
  • More Control: You can now use commands to automate more of the set up process, and you can set the distro name and install location.
  • Clearer error messages: The new architecture also means that error messages are clearer.

How to Install Ubuntu WSL Instance from tar File?

Ubuntu is now available in Microsoft’s new WSL distribution format and it is easy to get started with the new format.

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

Install Ubuntu using the command line:

Open PowerShell and run the following command:

wsl --install ubuntu

Install Ubuntu using a tar file:

If you have a tar file, use the command:

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

Double-click to install

You can also double-click a .wsl file to start the installation.

Install Ubuntu on WSL from tar File
Install Ubuntu on WSL from tar File

Related Read:

What About the Old Method?

If you are used to installing Ubuntu via the Microsoft Store, don't worry, that method still works. You can also still use the command wsl --install -d <DistroName> to install Ubuntu. The new tar-based system is an additional option, giving you more flexibility.

More Distributions will Adapt this New Format

While Ubuntu is among the first to utilise this new architecture, it's very likely that more distributions will adopt the new tar-based WSL distribution format in the future.

Here's why I think we can expect more distributions to follow:

1. New Architecture

The tar-based approach is a new way to create and distribute WSL distributions that does not rely on Windows-specific code or the Microsoft Store. This makes it easier for any Linux distribution to package itself for WSL.

2. Red Hat is about to release an official WSL distribution

Red Hat is also adopting the new tar-based architecture and will soon be delivering a Red Hat Enterprise Linux (RHEL) WSL distro image. This shows that major distributions are seeing the value in this approach.

3. Easier Customisation & Deployment

The new format allows for easier customisation, deployment, and management of WSL distributions. This is beneficial for both individual users and enterprises.

4. No Appx Package

The new architecture allows users to create a WSL distro without needing to write Windows code. The previous appx package method required users to package the tar file inside of an appx bundle. This makes it easier for any distribution to make a WSL distro and will likely lead to more distributions taking advantage of it.

5. General Availability

The new tar-based architecture is not specific to Ubuntu. It's a general update to how WSL distros are packaged and installed. This suggests that other distributions will be able to use this architecture.

6. Importing Custom Distros

The new architecture makes it easier to import custom Linux distributions using tar files. This functionality, combined with the benefits of the new architecture is expected to lead to more custom and official distributions being used on WSL.

7. Community Driven

The ability to create a WSL distro using only Linux tools and without reliance on the Microsoft Store could encourage more community driven distributions.

8. Microsoft's Aim

Microsoft aims to make the new tar-based architecture the default experience for existing and future distributions. This indicates a move towards wider adoption of the new format.

So, the move to a tar-based architecture is a significant shift for WSL that benefits both users and distribution maintainers. With major players like Ubuntu and Red Hat already adopting this approach, it’s highly likely that many more Linux distributions will become available via this method in the future.

Resource:

You May Also Like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More