It provides the latest Go version’s installation
First, download the binary release tarball for Linux from their downloads page. Then follow their installation instructions:
Open Terminal in your download location
Remove old Go installation (if exists):
sudo rm -rf /usr/local/go
Unzip the tarball & copy that go
folder to /usr/local/
:
sudo tar -C /usr/local -xzf go*linux-amd64.tar.gz
Add go
to PATH
in your SHELL profile file (~/.bashrc
or ~/.zshrc
)
export PATH=$PATH:/usr/local/go/bin
Reload SHELL
exec $(which $SHELL)
Verify Go is installed by checking it’s version:
go version
Most likely, there exists a some package of the Go language within the repositories of your package manager for your Linux distro. These may not be the latest Go version but are recent enough and tested to work well on your distro. For my Fedora distro, I referred the Fedora Developer portal page for installing Go via Fedora’s package manager dnf
:
sudo dnf install golang