ArchWSL
For me, the simplest procedure to install the Distro was to
-
Download the latest
Arch.zip
file from the project’s release page -
Extract it to a folder where your user has unrestricted read/write permissions (so ideally stay away from
Program Files
, etc.) -
Run the included
Arch.exe
-
Change the root password
Terminal window passwd -
Add the
wheel
group to the allowedsudo
usersTerminal window echo "%wheel ALL=(ALL) ALL" > /etc/sudoers.d/wheel -
Choose a username for your new user
Terminal window export username={username}and add this new user to the
wheel
groupTerminal window useradd -m -G wheel -s /bin/bash $username -
Change the new user’s password
Terminal window passwd $username -
Exit the WSL environment
Terminal window exit -
Set the new user as the default one
Terminal window Arch.exe config --default-user {username} -
Reboot the PC or alternatively restart
LxssManager
withTerminal window net stop lxssmanagernet start lxssmanager -
After that reenter WSL with
Terminal window Arch.exe -
Setup the
pacman
keyringTerminal window sudo pacman-key --initsudo pacman-key --populatesudo pacman -Sy archlinux-keyring -
Update the base system
Terminal window sudo pacman -Su
Just WorksTM? Special
As I’m sitting behind a corporate http
proxy, I initially had no access to the internet.
This can be confirmed by running
curl https://archlinux.org
To make WSL proxy-aware, I needed to
-
Add the exports to the
~/.bashrc
with~/.bashrc export http_proxy=http://<hostname>:<port>export https_proxy=$http_proxyexport ftp_proxy=$http_proxyPreemptively add the environment variables to
~/.config/xonsh/env.xsh
~/.config/xonsh/env.xsh $http_proxy = "http://<hostname>:<port>"$https_proxy = $http_proxy$ftp_proxy = $http_proxyNothing more to do, as nushell will get invoked through
~/.bashrc
-
Source it
Terminal window source ~/.bashrc -
Allow
sudo
to pass these environment variables through by setting theenv_keep
property in/etc/sudoers.d/proxy
/etc/sudoers.d/proxy Defaults env_keep += "http_proxy https_proxy ftp_proxy"
Rerunning the curl
-command should now produce a response and pacman
should update and upgrade just fine:
sudo pacman -Syyuu