一、Windows系统环境准备
1. Windows Terminal安装
官网下载安装:https://apps.microsoft.com/detail/9n0dx20hk701?hl=zh-CN&gl=CN

2. PowerShell权限开启
允许在这个电脑上运行任何 PowerShell 脚本(以管理员身份运行PowerShell输入以下命令):
Set-ExecutionPolicy Unrestricted
3. node.js安装
官网下载安装:https://nodejs.org/en/download
安装好后可以查看版本号验证是否安装成功
node -v
npm -v
显示正确的版本号说明安装成功

4. Git安装
官网下载安装:https://git-scm.com/install/windows
安装好后可以查看版本号验证是否安装成功
git --version
显示正确的版本号说明安装成功

5. Python安装
官网下载安装:https://www.python.org/downloads/windows/
安装好后可以查看版本号验证是否安装成功
python --version
显示正确的版本号说明安装成功

6. WSL安装

启用WSL和虚拟机平台组件,也可以在 PowerShell(管理员)执行安装WSL命令:
wsl --install
二、WSL操作Ubuntu系统
1. WSL安装Ubuntu系统
安装完成后重启电脑,然后安装Ubuntu命令:
wsl --install -d Ubuntu
2. 更新Ubuntu系统
更新Ubuntu系统命令:
sudo apt update
sudo apt upgrade -y
sudo apt install pipx -y
一键协议升级命令(HTTP → HTTPS 针对下载更新慢):
sudo sed -i 's|http://|https://|g' /etc/apt/sources.list.d/ubuntu.sources
3. 安装 Python
安装 Python命令:
sudo apt install python3-pip python3-venv -y
4. 安装解压缩软件
安装解压缩软件命令:
sudo apt install -y zstd
5. 安装nodejs
安装 nodejs 命令:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
6. 安装 Git
安装 Git 命令:
sudo apt update
sudo apt install -y git
检查有没有成功:
node -v
npm -v
git --version
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END




















请登录后查看评论内容