How to Install Go Language in Manjaro Linux?

Manjaro is a free open-source Linux distribution based on the Arch Linux operating system. Its features include a highly customizable GUI with a powerful command-line user interface. Golang is a procedural and statically typed programming language similar to the C programming language. It provides a rich standard library, garbage collection, and dynamic-typing capability. To know more please visit Golang Tutorial. Let’s discuss how to install the Golang Programming Language in Manjaro Linux. We will also see how to use the Golang compiler to build and run a go file.

Installation of Go Language in Manjaro Linux

Step 1: Update your system by running

$ sudo pacman -Syu

 

 

Step 2: Now, install Golang using Pacman

$ sudo pacman -S go

 

 

Step 3: Verify the installation

$ go version

 

Usage

A very basic go file is created that outputs “Beginner for Beginner”.

Go




package main
  
import "fmt"
  
func main() {
    fmt.Println("Beginner For Beginner")
}


Now, build the executable file using the build command.

$ go build gfg.go

$ ./gfg

 


Contact Us