Automatically install the latest version of Go.
- Supported Linux: Ubuntu / Debian or any distribution based on them.
# default
curl -fsL https://raw.githubusercontent.com/imkasen/go-installer/main/install.sh | bash
# fastgit proxy
curl -fsL https://raw.fastgit.org/imkasen/go-installer/main/install.sh | bash
Save the script as a file named install.sh
bash install.sh
The script is based on the official installation instruction from Go Docs.
- Search for the latest binary release and download it.
- People in Mainland China will use the URL
https://golang.google.cn/dl/
.
- People in Mainland China will use the URL
- The release will be installed at
/usr/local/go
. - The
GOPATH
will be added toPATH
.- People in Mainland China will be added a
GOPROXY
setting.
- People in Mainland China will be added a