Espejo
261 字
1 分钟
MyArchWSL
wsl --install archlinux配置 locale
设置 en_US.UTF-8
sed -i -e "s/^#zh_CN.UTF-8 UTF-8/zh_CN.UTF-8 UTF-8/" /etc/locale.gensed -i -e "s/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/" /etc/locale.genlocale-genecho 'LANG=en_US.UTF-8' > /etc/locale.conflocalemv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bakecho "Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/\$repo/os/\$arch" >> /etc/pacman.d/mirrorlistpacman -Syyupacman -S --needed vim sudo wget curl zsh git go# 启用 systemdecho -e "[boot]\nsystemd=true" >> /etc/wsl.conf# 配置 sudoEDITOR=vim visudo%wheel ALL=(ALL
) ALL
或者
sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers# 设置root用户密码passwd# 新增用户 Gakusyun 并加入 wheel用户组useradd Gakusyun -m -G wheel -s /bin/zsh# 设置用户密码passwd Gakusyun
# 设置 ws 为默认用户echo -e "[user]\ndefault = Gakusyun" >> /etc/wsl.conf或者
# 设置root用户密码echo "root:141421" | chpasswd# 新增用户 Gakusyun 并加入 wheel用户组useradd Gakusyun -m -G wheel -s /bin/zsh# 设置用户密码echo "Gakusyun:141421" | chpasswd
# 设置 ws 为默认用户echo -e "[user]\ndefault = Gakusyun" >> /etc/wsl.confgit clone https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.gitcd ohmyzsh/toolsREMOTE=https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git sh install.shgit clone --depth=1 https://gitcode.com/gh_mirrors/po/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10kgit clone https://gitcode.com/gh_mirrors/zs/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestionsgit clone https://gitcode.com/gh_mirrors/zs/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting.zshrc 编辑:
ZSH_THEME="powerlevel10k/powerlevel10k"plugins=( # other plugins... git zsh-autosuggestions zsh-syntax-highlighting z)goproxy
echo "export GO111MODULE=on" >> ~/.zshrcecho "export GOPROXY=https://goproxy.cn" >> ~/.zshrcsource ~/.zshrc安装 AUR,中国大陆环境请先允许上方代理命令
sudo pacman -S --needed base-develgit clone https://aur.archlinux.org/yay.gitcd yaymakepkg -siecho 'LANG=zh_CN.UTF-8' >> ~/.zshrc