Simple documented installation of ArchLinux on WSL

Original link:

Recently, on a whim, I plan to install Arch Linux on my own Windows. Installing on Windows is nothing more than using a virtual machine or WSL, so after thinking about it, I decided to install WSL.

Well, it’s definitely not because I saw other people have installed WSL and Arch, so I followed the trend (escape).

Definitely not someone forcing us to write articles, definitely not (hide)


This installation will use Github yuk7 / ArchWSL

According to the simplified Chinese documents in the warehouse, etc., the computer needs to run Windows 10 2004 at least, and needs WSL2 (if you don’t upgrade, there will be a lot of troubles)

Of course, international internet access is a must (escape)

ArchLinux on WSL environment construction

Open System Settings -> Apps -> Optional Features, scroll down to find “More Windows Features”

In the new pop-up window, find “Virtual Machine Platform” and “Windows Subsystem for Linux” and enable them, wait for the configuration to complete

Then, come here to download the Linux kernel update package and install it

What about after installation? Don’t go to to download the latest version of appx and cer or zip what are you doing? (knock)

Although we choose to download appx and cer without the word Online, because it is more convenient to install (nod)

After the download is complete, right-click “Install Certificate”, select “Local Computer”, the next step, Authorize

Select “Place all certificates in the following store”, click “Browse”, select “Trusted Publishers”

Mindless next step until the prompt “Import successful” is probably the installation of the certificate (thinking

Then open appx and click “install”

After installation, open the terminal (any one will do (I’m sure)), execute arch , and continue to wait for the installation to complete

After finishing, press Enter, and then continue to execute arch . After a while, the installation is completed. At this time, it should be estimated that it may be available (escape).

Switch domestic software sources

If you think what we said is too verbose and still don’t understand, it is recommended to copy and paste the command here (escape

Well, we’re actually too lazy to write this part. After all, it’s already there, so there’s no need to enter commands one by one.

Of course, if you really don’t understand, it is recommended to watch this or this (after all, they are all third-party tutorials (escape).

install hyfetch

To install hefetch, you have to install yay first

Execute sudo vim /etc/pacman.conf inside Arch and enter the following

Server =$arch

Once done and exited, execute sudo pacman -Syyu and sudo pacman -S --noconfirm archlinuxcn-keyring

If an error is reported after executing sudo pacman -S --noconfirm archlinuxcn-keyring error: libcap: signature from "David Runge <[email protected]>" is marginal trust , enter sudo pacman -Sy archlinux-keyring and execute it again

After that, execute sudo pacman -S yay to install yay , then Brainless carriage return Execute yay -S hyfetch (escape

When we operate again, an error occurs, the content is roughly as follows

 :: (1/1) Parsing SRCINFO: hyfetch
==> ERROR: Cannot find the strip binary required for object file stripping.
-> error downloading sources: hyfetch
context: exit status 15

==> ERROR: Cannot find the strip binary required for object file stripping.
-> error making: hyfetch

According to what Moe said after going to Google when he encountered this problem, he only needs to install base-devel, that is, execute sudo pacman -S base-devel

After successful installation, execute hyfetch to configure

Thanks to Moe for the pictures qwq Thanks to Moe for the pictures qwq

If you imagine the picture above, it will be displayed automatically after entering Arch

Execute vim ~/.bashrc , enter hyfetch in the last line, save it


After we restarted arch, the terminal output this content

An error occurred while mounting one of the filesystems. For details, run ‘dmesg’.

The solution is also very simple, just execute wsl --update (escape

Although Windows Subsystem for Linux Preview will be installed

As for using a custom account when starting Arch, you can execute arch config --default-user 账户名

(The premise is that there is already a corresponding account in Arch (whisper

Later, I also tossed with Moe to run the desktop environment on ArchLinux on WSl, here we are too lazy to write (escape

But the systemctl used to install the desktop environment, WSl itself is not supported

You can refer to Setting up Arch Linux with KDE Plasma in Windows Subsystem for Linux 2 after installing the wsl-distrod repository to complete the desktop environment setup

Acknowledgments & References

Thanks to Moe for first tossing the installation and Elihuso for giving Moe the hint about starting the automatic output (sure)

Thanks also to Moe for some writing suggestions for this article


This article is reproduced from:
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment

Your email address will not be published.