安装 WSL 的 Ubuntu 24.04 系统
使用 WSL 安装 Ubuntu 系统,并移动到 D 盘。
# 安装 WSL
wsl --install
# 查看版本
lsb_release -a
# 关闭 WSL
wsl --shutdown
# 列出所有已安装的发行版
wsl --list --all
# wsl --manage 直接移动(Windows 11 22H2+)
wsl --shutdown
# 确保关闭后再移动
wsl -l -v
# 移动
wsl --manage <发行版名称> --move D:\WSL\Ubuntu
# 例如
wsl --manage Ubuntu --move D:\wsl\ubuntu
# 备份
wsl --export Ubuntu G:\softLinux\Ubuntu-24.04.tar
在 Ubuntu 中安装 Golang
mkdir soft
cd soft
wget https://go.dev/dl/go1.25.5.linux-amd64.tar.gz
# 删除原来的
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.25.5.linux-amd64.tar.gz
添加环境变量
export PATH=$PATH:/usr/local/go/bin
查看版本
go version
加速
echo "export GOPROXY=https://goproxy.io,direct" >> ~/.profile
source ~/.profile
安装 BunJS
sudo apt install unzip curl -fsSL https://bun.sh/install | bash
source ~/.bashrc
bun --version
bun --help
安装 Node.js、npm、pnpm
# On most Unix systems including macOS, you can install with a single command:
curl https://get.volta.sh | bash
node -v
pnpm -v
npm config registry https://registry.npmmirror.com

