Installing Go on Ubuntu 16.04
Download the latest version of Go from https://golang.org/dl/
Extract package to /usr/local
Substitute $VERSION.$OS-$ARCH
with the equivalent values provided in the file you downloaded.
tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
Set your Path variable for Go by adding the following line to /etc/profile
export PATH=$PATH:/usr/local/go/bin
Logout and Log back into Ubuntu for the change to take effect, or enter the command above directly into terminal after adding it to the system profile.
That’s it type go version
to verify your install