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 Golang on CentOS 8 | RHEL 8 Linux system.

Install Go (Golang) on CentOS 8 | RHEL 8

In this guide we’ll use official automated installation of Go (Golang) on CentOS 8 | RHEL 8. The script will download and install Go language under of your own user account.

Download Go installer script.

sudo dnf -y install wget
wget https://git.io/go-installer.sh

Make the script executable.

chmod +x go-installer.sh

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

$ ./ bash go-installer.sh


	 ____  ___       ___ _   _ ____ _____  _    _     _     _____ ____  
	/ ___|/ _ \     |_ _| \ | / ___|_   _|/ \  | |   | |   | ____|  _ \ 
	| |  _| | | |_____| ||  \| \___ \ | | / _ \ | |   | |   |  _| | |_) |
	| |_| | |_| |_____| || |\  |___) || |/ ___ \| |___| |___| |___|  _ < 
	\____|\___/     |___|_| \_|____/ |_/_/   \_\_____|_____|_____|_| \_\
	
Finding latest version of Go for linux-amd64...
Downloading Go latest version (1.23.4)...
go1.23.4.linux-amd64.tar.gz   100%[==============================================>]  70.23M   107MB/s    in 0.7s    
Extracting go1.23.4.linux-amd64.tar.gz files to /root/.go...
Go (1.23.4) has been installed successfully!
Open a new terminal(to re login) or you can do: source /root/.bashrc

Source your bash profile file.

source ~/.bashrc

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

./go-installer.sh  --version [version]

Confirm GOPATH is configured.

$ echo $GOPATH
/home/USER/go

Confirm Go version installed on CentOS 8 / RHEL 8 Linux system:

$ go version
go version go1.23.4 linux/amd64

Recommended Go Learning Books:

LEAVE A REPLY

Please enter your comment!
Please enter your name here