Skip to content

0619-Linux 系统操作恶补 ​

用 g 管理多个 Go 版本 ​

bash
# 先装基础工具
sudo apt update
sudo apt install curl git -y

# 安装 g
curl -sSL https://git.io/g-install | sh -s

# 加载环境
source ~/.bashrc

# 安装指定版本 Go
g install latest
g install 1.24.4
g use 1.24.4

# 验证
go version

htop ​

安装 htop

bash
sudo apt update
sudo apt install htop

git 初始化 ​

bash
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
ls -la ~/.ssh/

go 初始化 ​

bash
export GO111MODULE=on
export GOPROXY=https://goproxy.cn