Install Go 1.11 on Ubuntu 18.04 & 16.04 LTS
Take advantage of much needed tools and components
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:
Now, extract the downloaded archive and install it to the desired location on the system. I generally keep it under
/usr/local 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
GOROOT is the location where the Go package is installed on your system.
GOPATH is the location of your work directory. For example, here directory is
.profile file and add a global variable at the end of the file. You may want to add this into a
.bashrc file as per your shell configuration.
3 . Update current shell session
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.