WSL
使用window下wsl2运行Ubuntu,作为本地开发和执行环境,方便后续各类软件的安装部署和使用。
wsl2安装参考:https://zhuanlan.zhihu.com/p/629314758
更新国内镜像源
避免软件包无法安装
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
sudo vim /etc/apt/sources.list
deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
sudo apt update
sudo apt upgrade
VSCode
作为IDE开发工具
插件
在本地中安装WSL,链接WSL环境后在wsl中安装go插件


Go
安装
1、下载go安装包
wget -c https://mirrors.aliyun.com/golang/go1.23.11.linux-amd64.tar.gz -O - |sudo tar -xz -C /usr
/local/
2、设置环境变量
export PATH=$PATH:/usr/local/go/bin
source ~/.profile
go version
go env -w GOPROXY="https://goproxy.io,direct"
3、export保存到.bashrc

5792

被折叠的 条评论
为什么被折叠?



