Install Go 1.11 on Ubuntu 18.04 & 16.04 LTS

Take advantage of much needed tools and components

Ridham Tarpara
Aug 27, 2018 · 2 min read
Image for post
Image for post

Go 1.11 was released on August 24th, 2018 and has introduced a few really needed tools and components. This includes versioned modules, experimental WebAssembly support, debugging improvements, and minor changes to core packages and performance/run-time.

This piece will walk through installing Go 1.11 on your Ubuntu 18.04 LTS, 16.04 LTS, and 14.04 LTS systems.

1. Install Go language

Upgrade to apply the latest security updates on Ubuntu.

sudo apt-get update
sudo apt-get -y upgrade

You need to download the Go binary file. You can find the list of download links as per OS and architecture from their official package. To install it on Ubuntu 64-bit OS, hit the following commands:

cd /tmp

Now, extract the downloaded archive and install it to the desired location on the system. I generally keep it under directory as suggested by standards.

sudo tar -xvf go1.11.linux-amd64.tar.gz
sudo mv go /usr/local

2. Set up Go environment

Now, let’s set up Go language environment variables , and .

is the location where the Go package is installed on your system.

is the location of your work directory. For example, here directory is .

Open your file and add a global variable at the end of the file. You may want to add this into a or file as per your shell configuration.

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

3 . Update current shell session

source ~/.profile

This will allow you to use go commands without restarting your terminal.

4. Verify installation

You have successfully installed and configured Go language on your system.

To check Go version:

go version// go version go1.11 linux/amd64

Now, also verify all configured environment variables using the following command:

You have successfully installed Go 1.11. You can now make some cool stuff with Go.

Better Programming

Advice for programmers.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store