In this tutorial, we will see how to install the Go programming language manually under Ubuntu 16.04 and Linux Mint 18 or older.

Go 1.7.3 Installation

Before installing Go on Ubuntu/Linux Mint, it is recommended that you update your system using these two commands:

sudo apt update 
sudo apt -y upgrade

Now, you can download and install Go using these commands:

cd /tmp 
wget -c https://goo.gl/RRSKUW -O go1.7.3.linux-amd64.tar.gz 
sudo tar -zxvf  go1.7.3.linux-amd64.tar.gz -C /usr/local/

Next, we need to set up Environment variables for Go in order to work properly. Edit first this file:

sudo gedit /etc/profile

Add this line:

export PATH=$PATH:/usr/local/go/bin 

Create a folder named "work"  that contains your workspace in your home directory using this command:

mkdir -p $HOME/work

Next, set the GOPATH variable by editing again /etc/profile using this command:

sudo gedit  /etc/profile

And add this line:

export GOPATH=$HOME/work
Save and exit. Reboot your system, then check current installed GO version with this command:

go version


go version go1.7.3 linux/amd64

Post a Comment