下载、解压
ArchWSL
# wsl配置
cat ~/.wslconfig
[experimental] # 未生效可尝试修改为wsl2
autoMemoryReclaim=disabled # 可以在 gradual/dropcache/disabled 之间选择
networkingMode=mirrored
dnsTunneling=true
firewall=false
autoProxy=true
sparseVhd=true# wsl导入
cd D:\wsl
mv .\rootfs.tar.gz .\arch-rootfs.tar.gz
mkdir arch
wsl --import arch D:\wsl\arch\ .\arch-rootfs.tar.gz
wsl -s arch
wsl# systemd
cat /etc/wsl.conf
[boot]
systemd=true[automount]
enabled = true
options = "metadata"
mountFsTab = true# 编辑源 取消China里面的一个源的注释
vim /etc/pacman.d/mirrorlist
# 初始化密钥文件,更新
pacman-key init
pacman -S archlinux-keyring
pacman-key --populate archlinux# 更新系统
pacman -Suy# 搜索软件包
# https://aur.archlinux.org/packages
# 安装自己需要的软件
pacman -S python python-pip python-pdm mlocate openssh psmisc# 配置python
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/
pip config set global.disable-pip-version-check true# 配置python pdm
pdm config pypi.url https://pypi.tuna.tsinghua.edu.cn/simple/# 编辑用户配置
vim /etc/profile
# 例如
alias ll='ls -l'# 安装docker
pacman -S docker docker-compose# 配置docker
mkdir -p /etc/docker
cat > /etc/docker/daemon.json << EOF
{
"registry-mirrors": ["https://docker.m.daocloud.io","https://docker.nju.edu.cn","https://mirror.baidubce.com","https://docker.mirrors.sjtug.sjtu.edu.cn"
],
"log-driver":"json-file",
"log-opts": {"max-size": "100m", "max-file": "5"}
}
EOF