There are several ways to install golang in your linux system, but the best one is this guide
#1 Download preferred go version
Go to https://golang.org/dl/ and download your preferred version, for example:
wget https://storage.googleapis.com/golang/go1.5.3.linux-amd64.tar.gz
Or the curl command:
curl -O https://storage.googleapis.com/golang/go1.5.3.linux-amd64.tar.gz
#2 Unzip the file
For example, we will unzip this in your home folder:
tar -xzf go1.5.3.linux-amd64.tar.gz -C $HOME
#3 Add go binary to the PATH
Edit your ~/.profile and append following lines:
PATH=$HOME/go/bin:$PATH
export GOROOT=$HOME/go
Reset your terminal session so the changes can take effects:
. ./.profile
#4 Check all works fine
Ask go command for the current version:
go version
This is the expected output:
go version go1.5.3 linux/amd64