Go is an increasingly popular programming language developed at Google. It has been used for many applications at different companies by building simple, reliable and efficient software in a more convenient way. It’s free, open source and uses high level syntax similar to scripting languages.
This tutorial will walk you through downloading and installing latest package, Go 1.10, as well as building a simple Hello World application to test the installation.
Step 1 – Update Package Lists
sudo apt update
Step 2 – Install wget To Download Go
sudo apt install wget -y
Step 3 – Download Latest Go
Step 4 – Untar Go Package
sudo tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz
Step 5 – Add Go Binaries To Path
echo "PATH=$PATH:/usr/local/go/bin" >> ~/.profile
Step 6 – Source Profile
Step 7 – Test The Installation
and it should print you the installed version of Go
Step 8 – Hello World Program
Step 9 – Run the Sample Program
go run test.go
If the above command returns “Hello, World!”, then Go is successfully installed and functional.
Watch my youtube video for a more detailed explanation of the installation steps.