How to install Go 1.7 in Linux Ubuntu. GoLang (Go Programming Language) for Linux Ubuntu is an open source programming language that makes it easy to build simple, reliable, and efficient software. Go is an open source project developed by a team at Google and many contributors from the open source community.
Go 1.7 is the latest release of the Go Programming Language. Go 1.7 adds a port to IBM LinuxOne; updates the x86-64 compiler back end to generate more efficient code; includes the context package, promoted from the x/net subrepository and now used in the standard library; and adds support in the testing package for creating hierarchies of tests and benchmarks. The release also finalizes the vendoring support started in Go 1.5, making it a standard feature.
For Linux Systems, Go 1.7 adds an experimental port to Linux on z Systems (linux/s390x) and the beginning of a port to Plan 9 on ARM (plan9/arm).
The experimental ports to Linux on 64-bit MIPS (linux/mips64 and linux/mips64le) added in Go 1.6 now have full support for cgo and external linking. The experimental port to Linux on little-endian 64-bit PowerPC (linux/ppc64le) now requires the POWER8 architecture or later. Big-endian 64-bit PowerPC (linux/ppc64) only requires the POWER5 architecture.
Install Go 1.7 On Linux Ubuntu
Download the archive from the official source and extract the package into /usr/local, creating a Go tree in /usr/local/go. You can download the source from https://storage.googleapis.com/golang/go1.7.3.linux-amd64.tar.gz [official source]. Please note to select the appropriate installation archive. For example, to install Go version 1.2.1 for 64-bit x86 Linux Ubuntu systems, you must download the installer archive called go1.2.1.linux-amd64.tar.gz.
Once download, extract the archive to the destination folder. For example:
tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
-C is the destination folder.
Now add /usr/local/go/bin to the PATH environment variable. You can do this by adding this line to your /etc/profile (for a system-wide installation) or $HOME/.profile:
Installing Go to a custom location
Apart from the /usr/local, you can also install Go to a custom location. In this case you must set the GOROOT environment variable to point to the directory in which it was installed. For example, if you installed Go to your home directory you should add the following commands to $HOME/.profile:
Check The Installation
Once done, it’s time to verify GoLang installation for Linux Ubuntu. Run the following commands to verify the installation:
To uninstall and remove Go from Linux ubuntu system, simply delete the go directory. This directory is usually /usr/local/go in Linux Ubuntu systems. You should also remove the Go bin directory from your PATH environment variable. Under Linux and FreeBSD you should edit /etc/profile or $HOME/.profile.