Installing Arch linux on WSL
Install Arch linux under WSL is quite straightforward.
- Head over to ArchWsl and download the latest version
- Extract the file
- Launch a terminal (I highly recommend windows terminal)
cd
into the location of thearch.exe
file- Run it!
And just like that, arch is installed in wsl. There are further steps needed to turn it into a full fledged OS, but the above is way easier than the traditional installation steps.
Further customization
Just like that, arch isn’t quite useful. There are further steps recommended. I’ll be writing up more on this later on.
Import / Export
One of the coolest things about
WSL is the ability to export then import the distro.
This is how I move it from one PC to another when a lot of changes happened.
That way, I end up finding myself on the new PC with the exact same files and environment as the one on the old PC!
Export
First, export the distro:
|
|
You can find the <WSL Image Name>
by running wsl --list
Import
Importing is also done with a single command:
|
|
Note that if the you are replacing a distro that already exists, you might first need to run:wsl --unregister
Things to watch out for
If you are coming from a linux background, you need to know that systemd
doesn’t not work as expected
How to have a GUI
While you can run wsl from a windows terminal, it is also cool to start it with a window manage such as
i3.
Here’s an in-depth guide on how to do that:
Running arch with i3 in wsl using vcxsrv