Go, commonly referred as Golang is a modern open source programming language for building reliable, simple and efficient software applications. Go powers popular applications such as Kubernetes, Prometheus, Docker, Terraform, Sensu and many others.

This tutorial will walk you through the installation of Go 1.14 on CentOS 8 / CentOS 7 Linux system.

Install Go 1.14 on CentOS 8 | CentOS 7

In this guide we’ll use a simple bash script created by Jorge Canha to install Go on CentOS 8 / CentOS 7 Linux machine. The script will download and install Go language under of your own user account.

Download script.

--- With curl ---
curl -O https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh

--- With wget ---
wget https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh

Make the script executable.

$ chmod +x goinstall.sh

If you run the script without passing version in option, it will download the latest release.


To install specific version, pass the version number to –version argument.

--- Install Go 1.14 ---
$ ./goinstall.sh --version  1.14

--- Install Go 1.13 ---
$ ./goinstall.sh --version  1.13

Installation output:

esolving storage.googleapis.com (storage.googleapis.com)... 2a00:1450:400f:808::2010,
Connecting to storage.googleapis.com (storage.googleapis.com)|2a00:1450:400f:808::2010|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 120050424 (114M) [application/octet-stream]
Saving to: ‘/tmp/tmp.vlZUgncsKp/go.tar.gz’

100%[==============================================================================================================>] 120,050,424 34.4MB/s   in 3.3s   

2020-06-12 00:46:12 (34.4 MB/s) - ‘/tmp/tmp.vlZUgncsKp/go.tar.gz’ saved [120050424/120050424]

Extracting File...

Go 1.14 was installed into /root/.go.
Make sure to relogin into your shell or run:

	source /root/.bashrc

to update your environment variables.
Tip: Opening a new terminal window usually just works. :)

Source your bashrc file.

source /root/.bashrc

Confirm GOPATH is configured.

$ echo $GOPATH

Confirm Go version installed on CentOS 7:

$ go version
go version go1.14 linux/amd64

Uninstall Go on CentOS 8 | CentOS 7

The same script can be used to install Go on CentOS 8 | CentOS 7:

$ ./goinstall.sh  --remove
Go removed.

Enjoy developing world changing applications with Go.

Go Learning courses:

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here