# 更新
sudo apt-get update
sudo apt-get -y upgrade
# 获取最新安装包 https://golang.org/dl/
wget https://dl.google.com/go/go1.13.3.linux-amd64.tar.gz
sudo tar -xvf go1.13.3.linux-amd64.tar.gz
sudo mv go /usr/local
# vi ~/.profile
export GOROOT=/usr/local/go
export PATH=$GOROOT/bin:$PATH
source ~/.profile
go version
> go version go1.13.4 linux/amd64