How to Set Up ArchWSL

Requirements

  • Windows 10 1709 Fall Creators Update 64bit or later.
  • Windows Subsystem for Linux feature is enabled.

Installation Instructions

There are three ways to install ArchWSL.

Method 1: zip file

  1. Download the installer zip.
  2. Extract all files in zip file to the same directory. Please extract to a folder that you have write permission. For example, C:\Program Files cannot be used since the rootfs cannot be modified there.
  3. Run Arch.exe to extract the rootfs and register to WSL

As a side note, the executable name is what is used as the WSL instance name. If you rename it, you can have multiple installs.

Method 2: appx package

  1. Download the .appx and .cer
  2. Install .cer to the “Trusted Root Certificate Store” of the local machine. For details, please refer to the Install Certificate page. You will need administrator privileges to install the certificate.
  3. Install the .appx

Method 3: online installer

  1. Download Arch_Online.zip
  2. Extract all files in zip file to the same directory.
  3. Run Arch.exe to download rootfs and register to WSL

This zip file is doesn’t include rootfs (~200 MB), hence its zip file is very small (~2 MB), but rootfs is donwloaded in the first run.

Setup after install

If you are a WSL1 user, you must change the glibc package. Please see Known issues.

Setting the root password

>Arch.exe
[root@PC-NAME]# passwd

Set up the default user

Please see ArchWiki Sudo and User and groups pages.

>Arch.exe
[root@PC-NAME]# echo "%wheel ALL=(ALL) ALL" > /etc/sudoers.d/wheel
(setup sudoers file.)

[root@PC-NAME]# useradd -m -G wheel -s /bin/bash {username}
(add user)

[root@PC-NAME]# passwd {username}
(set default user password)

[root@PC-NAME]# exit

>Arch.exe config --default-user {username}
    (setting to default user)

If the default user has not been changed (issue #7), please reboot the computer or alternatively, restart the LxssManager in an Admin command prompt.

To restart the LxssManager, run this:

net stop lxssmanager && net start lxssmanager

Initialize keyring

Please excute these commands to initialize the keyring. (This step is necessary to use pacman.)

>Arch.exe
[user@PC-NAME]$ sudo pacman-key --init

[user@PC-NAME]$ sudo pacman-key --populate

[user@PC-NAME]$ sudo pacman -Sy archlinux-keyring

[user@PC-NAME]$ sudo pacman -Su

Install patched glibc (need in WSL1)

Arch’s glibc is built for Linux kernel 4.4 and above and does not work with WSL1.

WSL1 users should always follow the steps in Known issues.

Install systemctl alternative (Optional)

WSL does not have support for systemd however, there are several solutions. Please see Known issues.


Table of contents


Back to top

Copyright © 2020 Wsldl-pg Documentation Team. Distributed by Creative Commons Attribution 4.0 International License.