Through this tutorial, you will learn a method of setting up Arch Linux on Windows WSL system.
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:
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:
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:
Head over to the releases page to download the installer packages.
ArchWSL-AppX_[version].appx package and the
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.
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.
NOTE: Ensure the certificate contains details as shown above.
Select Install and choose
Keep in mind that this will require elevated privileges.
In the next Window, select
Place all certificates in the following store.
Trusted Root Certification Authorities
Finally, select next and click install to complete the process.
Once completed, launch the download
.appx file to begin the installation.
Click Install and done.
Once completed, you can launch arch from the Start menu.
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
scoop install archwsl
And with that, you should Arch installed and ready to run.
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
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.