Skip to main content

Installing Go (Golang) on Ubuntu

Download the latest version of Go

Visit the All releases to download the latest stable version of Go.

wget [go-archive-file]

Extract the archive file

Extract the archive file to the /usr/local directory.

sudo tar -C /usr/local -xvf [go-archive-file]

Set the Go environment variables

Add the Go binary directory to the PATH environment variable.

export PATH=$PATH:/usr/local/go/bin

Verify the Go installation

Verify the Go installation by running the following command. You should see the Go version number.

go version