Ubuntu Install Go/Golang

Kevin FOO
Jun 9, 2020

--

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

--

--

Kevin FOO
Kevin FOO

Written by Kevin FOO

A software engineer, a rock climbing, inline skating enthusiast, a husband, a father.

No responses yet