Step by Step Guide to Install Go Programming language on Ubuntu 20.04

Go is a free & open-source programming language. It created by Google. It is also knows as Golang. Go is a fast and high-performance language & easy to use, read and understand.

There are some steps to install Go programming language on ubuntu:

Step 1: Update the System.

apt-get update

Step 2:Install Go.

apt-get install golang-go

Step 3: Check the version of Go.

go version

  • Here is the command output.

Step 4: Create a folder.

mkdir Project

  • Go to created folder directory.

cd project

Step 5: Create a file.

vim test.go

  • Add the following code.

package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}

Step 6: Run the code.

go run test.go

  • Here is the command output.

 

Leave a Reply