Dev

How To Install Go (Golang) on CentOS 8 | RHEL 8

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.

Original content from computingforgeeks.com - post 59666

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:

Keep reading

Install GitHub CLI (gh) on Linux, macOS, and Windows Programming Install GitHub CLI (gh) on Linux, macOS, and Windows Claude Opus 4.8 Released: Features, Benchmarks, and Claude Code Guide AI Claude Opus 4.8 Released: Features, Benchmarks, and Claude Code Guide Customize KDE Plasma Desktop with Themes|Modules|Extensions AlmaLinux Customize KDE Plasma Desktop with Themes|Modules|Extensions RHEL Command-Line AI Assistant: Hands-On with Lightspeed and goose AI RHEL Command-Line AI Assistant: Hands-On with Lightspeed and goose Claude Fable 5 Released: Features, Benchmarks, and Claude Code Guide AI Claude Fable 5 Released: Features, Benchmarks, and Claude Code Guide Install PostGIS on Rocky Linux 8|CentOS 8|AlmaLinux 8 CentOS Install PostGIS on Rocky Linux 8|CentOS 8|AlmaLinux 8

Leave a Comment

Press ESC to close