Go language, also referred to as
Golang is an open-source and modern programming language created by Google.
Golang makes it possible to compile a single
Go program and an executable that will run on Linux, Windows, and macOS without altering the code.
The following are the steps required to install
Prerequisites for installation:
Download and install
Go tarball using the command below.
curlcan be used in place of the
wgetin the command above.
The most recent stable version of
Verify the tarball checksum with the following command once the download is completed.
The output should be similar to the one below.
You can compare and confirm if the hash value of the output above matches the checksum value on the
Go download page based on the
Go version. You can proceed with the installation if they match.
Extract the downloaded file, the tarball, to the
/usr/local directory using the following command.
tar -C /usr/local -xvzf go1.17.3.linux-amd64.tar.gz
Set up the
Go path environment variable to execute
Go like any other command in the file system.
Add the code below to the
/etc/profile file for a system-wide installation or
$HOME/.bash_profile file for a current user installation.
Save the file and load the new
PATH environment variable into the present shell session. The command below saves the file into a
Go installation by checking the version of
Go installed. Use the command below to check.
You should see the following output if the installation was successful.
go version go1.17.3 linux/amd64
After a successful installation of
Go, you can go ahead and create your first
View all Courses