Overview How to download (clone) and build go from source Clone repo GO_SDK_SRC_DIR=$HOME/sdk/official-golang-repo; mkdir -pv $GO_SDK_SRC_DIR; PARENT_DIR=$(readlink -f "$(dirname "${GO_SDK_SRC_DIR[0]}")") DIR_NAME="$(basename "${GO_SDK_SRC_DIR[0]}")" cd $PARENT_DIR; git clone https://go.googlesource.com/go $DIR_NAME cd $GO_SDK_SRC_DIR Build Sources Install an older version of go first Add the older version of go to the $PATH Build & test GO_SDK_SRC_DIR=$HOME/sdk/official-golang-repo; cd $GO_SDK_SRC_DIR # or some tag like: "go1.19" git checkout master cd src; ./all.bash Verify GO_SDK_SRC_DIR=$HOME/sdk/official-golang-repo; cd $GO_SDK_SRC_DIR/bin ls -l look for go and gofmt Other Resources https://go.dev/doc/install/source GO_SDK_SRC_DIR=$HOME/tmp/go-sdk-source;