安装系统
1
2
|
wsl --install archlinux
wsl --set-default archlinux
|
更新 pacman
在 /etc/pacman.d/mirrorlist 头部 加入:
1
|
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch
|
archlinux | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
在 /etc/pacman.conf 头部 加入:
1
2
|
[archlinuxcn]
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch
|
并安装 keyring
1
|
pacman -Sy archlinuxcn-keyring
|
archlinuxcn | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
更新 key
见 Archlinux 更新 key
!Archlinux 更新 key
设置账户
1
2
3
|
passwd root
useradd -m dvdbr3o
passwd dvdbr3o
|
设置 sudo 权限
1
2
3
|
pacman -S sudo
echo "%wheel ALL=(ALL) ALL" > /etc/sudoers.d/wheel
usermod -aG wheel dvdbr3o
|
设置默认登录用户
退回到 windows
1
|
wsl --manage archlinux --set-default-user dvdbr3o
|
安装 yay
常用软件
1
|
yay -S git base-devel llvm xmake
|
shell
1
2
|
yay -S nushell starship
chsh -s /bin/nu
|
Starship
在 $nu.config-path 中添加
1
2
|
mkdir ($nu.data-dir | path join "vendor/autoload")
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
|