Open In App

How to Install Go Language in Manjaro Linux?

Last Updated : 02 Jun, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

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

Updating-the-system

 

Updating-the-system

 

Step 2: Now, install Golang using Pacman

$ sudo pacman -S go

Proceeding-installation

 

Installing-golang

 

Step 3: Verify the installation

$ go version

Verifying-the-installation

 

Usage

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

Go




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


Now, build the executable file using the build command.

$ go build gfg.go

$ ./gfg

Building-the-executable-file

 


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads