-
Download
archlinux-bootstrap-<version>-x86_64.tar.gz
from one of the mirrors. You should verify its signature. -
While it's possible to import a
.tar.gz
into WSL, Arch's bootstrap needs to be adjusted first. Open any Linux distro that can transfer files to/from Windows. (WSL counts.) -
In Linux:
# This needs to be done as root to avoid WSL permission issues. sudo -i # Extract it, cd into the folder, and compress it again. tar -zxvf archlinux-bootstrap-<version>-x86_64.tar.gz cd root.x86_64 tar -zcvf ../archbootstrap.tar.gz . # Move it to Windows somewhere. mv ../archbootstrap.tar.gz /mnt/c/Users/purpzie/archbootstrap.tar.gz
-
In Windows:
:: wsl --import <distro name> <where to store the distro> <path to the .tar.gz> wsl --import Arch "C:\Users\purpzie\arch" "C:\Users\purpzie\archbootstrap.tar.gz" wsl -d Arch echo -e '[boot]\nsystemd = true' >> /etc/wsl.conf exit wsl --shutdown wsl -d Arch
Congrats, you're in Arch Linux. Here's how to get it working:
# Set up pacman's keys.
pacman-key --init
pacman-key --populate archlinux
# If the above command fails, run this and try again:
# rm -rf /etc/pacman.d/gnupg
# Set up pacman's mirror list. (If you're not in the US, change the last URL param.)
curl -s "https://archlinux.org/mirrorlist/?protocol=https&ip_version=4&use_mirror_status=on&country=US" | sed -e 's/^#Server/Server/' -e '/^#/d' > /etc/pacman.d/mirrorlist
# Update the system and install important packages.
pacman -Syu
pacman -S --needed base-devel
pacman -S nano pacman-contrib
# Set your language.
nano /etc/locale.gen # For english, uncomment 'en_US.UTF-8 UTF-8' and save.
locale-gen
echo 'LANG=en_US.UTF-8' >> /etc/locale.conf
# Set a root password.
passwd
# Set up sudoers by uncommenting '%wheel ALL=(ALL:ALL) ALL'
EDITOR=nano visudo
# Create a user and set them as the default. (Replace purpzie with your username.)
useradd -m -G wheel purpzie
passwd purpzie
echo -e '[user]\ndefault = purpzie' >> /etc/wsl.conf
# If you want, you can set a custom hostname too.
echo -e '[network]\nhostname = arch' >> /etc/wsl.conf
Go back to windows, use wsl --shutdown
, then open a new Arch shell. You should be good to go!
@Purpzie