ArchWSL [1][2][3]ยถ
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V
wsl --set-default-version 2
wsl --update --web-download
scoop install archwsl
arch
passwd
echo "%wheel ALL=(ALL) ALL" > /etc/sudoers.d/wheel
useradd -m -G wheel -s /bin/bash <username>
passwd <username>
exit
arch config --default-user <username>
arch
Use repository mirror [4]:
sudo vim /etc/pacman.conf
[archlinuxcn]
Server = https://repo.archlinuxcn.org/$arch
sudo cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
sudo vim /etc/pacman.d/mirrorlist
Server = https://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch
# sudo pacman -Sy archlinux-keyring
# sudo pacman-key --init
# sudo pacman-key --populate archlinux
sudo pacman -Sy archlinuxcn-keyring
sudo pacman-key --init
sudo pacman-key --populate
sudo pacman -Syyu
sudo pacman -S --needed base-devel
Install Optsยถ
sudo pacman -S <pkg>
sudo pacman -Syu yay
yay -S <pkg>
yay -S paru
paru <pkg>
For example:
# sudo pacman -S --needed git base-devel
sudo pacman -S \
asciinema \
aspell \
aspell-en \
ast-grep \
atuin \
bat \
cargo \
chafa \
chezmoi \
cmus \
cronie \
curl \
dictd \
difftastic \
docker \
docker-compose \
eza \
fastfetch \
fd \
ffmpegthumbnailer \
fzf \
git \
github-cli \
glow \
gnupg \
harper \
lazygit \
less \
neovim \
newsboat \
nvm \
imagemagick \
openssh \
pandoc-cli \
pass \
pdftoppm \
pnpm \
presenterm \
python-pipx \
rbenv \
ripgrep \
rust \
sdcv \
starship \
tailscale \
tere \
tldr \
texlab \
tmux \
tmuxinator \
translate-shell \
uv \
wget \
xsel \
yq \
zoxide \
zsh
# go \
# dedoc \
yay -S --noconfirm \
act \
carapace-bin \
epub-thumbnailer-git \
epy-ereader-git \
fontpreview \
gvm \
lazydocker-bin \
paru \
ruby-build \
texlive-installer \
win32yank \
wordnet-common
pyenv global 3.10
hererocks lua51 -l5.1 -rlatest
source lua51/bin/activate
luarocks install luacheck
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y
# rustup default nightly
pipx install deep-translator pip_search
pip install codespell isort
sudo /home/<username>/.pyenv/shims/pip install hererocks
cargo install autocast grex pipe-rename tidy-viewer thumbs trashy
pnpm add -g clean-css html-minifier js-beautify prettier svgo terser
pnpm add -g degit echo-cli npms-cli markserv open-cli png-to-ico serve
Remove Windows 10โs PATH [5][6]ยถ
sudo vim /etc/wsl.config
[interop]
appendWindowsPath = false
Install fontsยถ
mkdir -p ~/.local/share/fonts
mv <font> ~/.local/share/fonts/
fc-cache -fv
D-Bus [7]ยถ
# sudo pacman -S dbus
sudo mkdir /run/dbus -p
sudo dbus-daemon --system
systemd/systemctl [7]ยถ
vim /etc/wsl.conf
[boot]
systemd=true
WSLgยถ
ln -s /mnt/wslg/runtime-dir/wayland-0* /run/user/1000/
On Windows:
Edit ~/.wslconfig
[wsl2]
guiApplications=false