Installing Go on Ubuntu 16.04

/ / installing go on ubuntu 16.04

Updated: 2017-03-02

Hi there! This article will hopefully help you install and setup Go on your Ubuntu system :)

How to install Go

Installing golang on Ubuntu is very straightforward.

Run the following commands:

sudo add-apt-repository ppa:ubuntu-lxc/lxd-stable
sudo apt update
sudo apt install golang

After installing golang, remember to create your GOPATH. This can be done by adding the following to your ~/.bashrc file:

export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

That’s all there is to it :)