How to install Go language in Linux

  
 The Go language (ie Golang) is a programming language originally developed by Google. It has several design principles since its birth: simplicity, security and speed. The Go language distribution has a variety of debugging, testing, tuning, and code review tools. Today the Go language and its toolchain are available in the underlying repositories of most Linux distributions and can be installed with the default package manager.

Installing Go on Ubuntu, Debian, or Linux Mint
The following is an installation of the Go language and its development tools using apt-get on a Debian-based distribution.
$ sudo apt-get install golang
Check the version of the Go language to verify the installation.
$go version
go version go1.2.1 linux/amd64
Depending on your needs, you may want to use apt-get to install additional Go tools.
$ sudo apt-cache search golang

Installing Go in Fedora, CentOS/RHEL
The following command installs the Go language and its tools in a Red Hat-based distribution.
$ sudo yum install golang
Check the Go language version to verify the installation.
$go version
go version go1.3.3 linux/amd64
Depending on your needs, you may want to use yum to install additional Go tools.
$ yum search golang

Install Go from the official website
Sometimes the go language version in the distribution is not up to date. To avoid this, you can install the latest Go language from the official website. Here are the steps.
Enter the official source code for the Go language and download the pre-compiled binary code.
For 64-bit Linux:
$ wget https://storage.googleapis.com/golang/go1.4.1.linux-amd64.tar.gz
For 32-bit Linux:
$ wget https ://storage.googleapis.com/golang/go1.4.1.linux-386.tar.gz
Installing the program under /usr/local
$ sudo tar -xzf go1.4.1.linux-xxx.tar .gz -C /usr/local
Add a system-wide PATH environment variable to /etc/profile.
$ sudo vi /etc/profile export PATH=$PATH:/usr/local/go/bin
If you installed Go in a custom location other than /usr/local, you also need to set GOROOT Environment variables to point to a custom installation location.
$ sudo vi /etc/profile
export GOROOT=/path/to/custom/location
Check the version of the Go language
$ go version
go version go1.4.1 linux/amd64< Br>
Copyright © Windows knowledge All Rights Reserved