Linux install and setup

suggest change

A distribution package manager can install Go, although its packaged version may lag behind the current release:

sudo apt update
sudo apt install golang-go

For the current official release, follow the archive installation instructions at go.dev/doc/install. The archive filename and version change with each release, so use the command shown on that page rather than a pinned filename.

Verify the installation:

go version
go env GOPATH GOBIN

Source code may live anywhere. If GOBIN is unset, go install writes commands to $(go env GOPATH)/bin; add that directory to PATH if needed:

export PATH="$PATH:$(go env GOPATH)/bin"

Place the export in your shell startup file, such as ~/.bashrc or ~/.zshrc.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents