Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

How to Install Golang on CentOS 7?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

The Go programming language is an open-source project to make programmers more productive. 
Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It’s a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.

Prerequisites:

The user used(Linux user)In this tutorial is root or a user with root power i.e add sudo at the starting of every command.

Installing Go on Centos 7:

Follow the below steps to install the Go programming language on Centos 7:

Step 1:First download Wget software using the below command:

yum install wget -y

install wget

Then install GO using wget command:

wget https://golang.org/dl/go1.17.2.linux-amd64.tar.gz3

 install GO using wget command

Step 2: Now remove the previous installation (if any ) and unzip the downloaded tar file of GO using the below command:

rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.2.linux-amd64.tar.gz

Installing Go

Step 3: Now add the path of Go in the PATH variable by  using the below command:

export PATH=$PATH:/usr/local/go/bin

Adding Go to PATH

Step 4:  To verify that go is properly installed run this command: 

go version

If this shows up then you are all set to start with go, if not redo all the steps above.

My Personal Notes arrow_drop_up
Last Updated : 13 Oct, 2021
Like Article
Save Article
Similar Reads