Install GO in UNIX/LINUX Environment

Go is a statically typed, compiled programming language designed at Google by Robert Griesemer, Rob Pike, and Ken Thompson. Follow the below steps to install it on you Linux/Unix Box :

  1. Download it from https://golang.org/dl/
$ curl -sSL https://golang.org/dl/goX.XX.X.linux-amd64.tar.gz -o goX.XX.X.linux-amd64.tar.gz

replace the X.XX.X with current version.

  1. Extract the downloaded file to /usr/local
$ sudo tar -C /usr/local -xzf goX.XX.X.linux-amd64.tar.gz
  1. Add the path /usr/local/go/bin to the environment variable, and for that just add the below lines to your .bashrc file, which is located on your home directory ~/.bashrc. Add below lines
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH

and now you are good to GO {he he !!}. Test the setup with go version

$ go version  
go version go1.15.3 linux/amd64

thats it.