Skip to content

Instantly share code, notes, and snippets.

@marlonmarcello
Last active February 14, 2025 19:20
Show Gist options
  • Save marlonmarcello/819cc53f6c8eb6b25d77adee7db259d4 to your computer and use it in GitHub Desktop.
Save marlonmarcello/819cc53f6c8eb6b25d77adee7db259d4 to your computer and use it in GitHub Desktop.
Install Go

Check the version and file name on Go's website and just update the line bellow https://go.dev/dl/

Setup paths

export GO_VERSION=1.23.6
export GOROOT=/usr/local/go/go$GO_VERSION
export GOPATH=$HOME/go$GO_VERSION
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
source ~/.profile

Dowload and install

wget https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz
tar -xvf go$GO_VERSION.linux-amd64.tar.gz
mv go /usr/local/go/go$GO_VERSION

Next time you need a new version just update GO_VERSION and go through "Download and install".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment