Ubuntu Install Go/Golang

I prefer to install Go/Golang with Ubuntu 20.04 apt since I do not need the latest up to date version. To install run the commands below.

sudo apt update
sudo apt upgrade -y
sudo apt install -y golang-go

Now create a simple script to check if your Go/Golang was installed successfully. Lets name it “test.go”

package mainimport "fmt"func main() {
fmt.Println("hello world")

To run the script.

go run test.go

If you see “hello world” that means you had successfully installed Go/Golang. To check your Go/Golang version use the command below.

go version

< Back to all the stories I had written

Written by

A software engineer, a rock climbing, diving & rollerblading enthusiast, a husband, a father.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store