How to run Arch Linux in WSL

Through this tutorial, you will learn a method of setting up Arch Linux on Windows WSL system.

How to run Arch Linux in WSL

The Windows Subsystem for Linux has completely revolutionized the way developers build applications. It allow us to quickly and easily spin up a Linux distribution straight from our Windows machine.

This removes the need to dual boot your machine. It also allows you to integrate your already available tools in your development ecosystem. For example, you can run an WSL instance into a VSCode session in a single click.

It also removes the overhead provided by Virtual machines which required additional hardware support and configuration.

Therefore, if you want to get started in Linux without making any permanent changes to your Windows machine, WSL is probably your best bet.

However, although WSL does come with great power, it lacks support for some distributions. In this tutorial, we will show you how to run Arch Linux in WSL.

Enable WSL on Windows

As usual, the first step is to ensure you have WSL enabled and configured on your machine.

Before running the commands provided in this tutorial, you will need to ensure you have Windows 10 Build 2004 and above.

Open your Windows Command Prompt with administrator privileges and run the command:

wsl --install

The command above will download, install and configure the latest version of the Linux kernel for your system.

Keep in mind that there are different WSL versions. To ensure compatibility with various Linux distributions, set WSL version 2 with the command:

wsl --set-default-version 2

This will set WSL version 2 as default kernel.

If you are on older versions of WSL, you can upgrade to WSL version 2 by running the command:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Next, enable Virtual Machine Platform with the command:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Finally, download the WSL version 2 update package in the resource below and install:

https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi

Finally, run the command below to set WSL 2 as default.

wsl --set-default-version 2

Once everything is ready, follow the steps provided in the next step to run Arch Linux.

Download and Configure Arch on WSL.

Although Arch Linux is not provided in the official store, you can still run an Arch instance in WSL thanks to Open-Source Developers.

Method 1 - Using App Package Installer

Open your browser and navigate to the resource below:

https://github.com/yuk7/ArchWSL

Head over to the releases page to download the installer packages.

Select the ArchWSL-AppX_[version].appx package and the Arch-AppX_[version].cer

image-20220801084244628

NOTE: Avoid the Online installer package as this will require you to have a network connection.

Once downloaded, open the .cer file and click open.

image-20220801084329974

Next, read the certificate details and ensure it contains details such as issued by and created by. This certificate allows you to install appx packages outside of the microsoft store.

image-20220801084438210

NOTE: Ensure the certificate contains details as shown above.

Select Install and choose Local Machine.

image-20220801084629605

Keep in mind that this will require elevated privileges.

In the next Window, select Place all certificates in the following store.

Next, select Trusted Root Certification Authorities

image-20220801084932618

Finally, select next and click install to complete the process.

Once completed, launch the download .appx file to begin the installation.

image-20220801085059404

Click Install and done.

image-20220801085117251

Once completed, you can launch arch from the Start menu.

image-20220801085142040

Using Scoop

If you have scoop installed on your machine, you can use it to install Arch WSL with two simple commands.

Open the command prompt as administrator and run the command:

scoop bucket add extras
image-20220801085227884

Finally, run:

scoop install archwsl

And with that, you should Arch installed and ready to run.

Initializing Arch

Once the installation is complete, ensure to start the Arch instance allowing you to initialize pacman keyring and databases.

Finally, refresh package repositories with the command:

sudo pacman -Syu
image-20220801085955958

Termination

And with that, you should have Arch Linux instance running on your WSL platform.

We thank you for reading, feel free to share and if you face any issues, feel free to contact us.

If you enjoy our content, please consider buying us a coffee to support our work:

Table of Contents
Great! Next, complete checkout for full access to GeekBits.
Welcome back! You've successfully signed in.
You've successfully subscribed to GeekBits.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info has been updated.
Your billing was not updated.