Installing GO in Ubuntu

Carlos Gómez
devops and cross platform development
1 min readJan 16, 2018

--

One of my main goals this year is to learn how to write code in Golang, so let’s start with the installation of Golang (1.9.2) in Ubuntu (17.10).

  1. Download GO package from https://dl.google.com/go/go1.9.2.linux-amd64.tar.gz
  2. Extract it into /usr/local, creating a Go tree in /usr/local/go.
 sudo tar -C /usr/local -xzf go1.9.2.linux-amd64.tar.gz

3. Add /usr/local/go/bin to the PATH environment variable (for example you can add it to any of this files: $HOME/.bash_profile,$HOME/.zshrc,$HOME/.profile).

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

4. Don’t forget to execute source $HOME/.\b(?:zshrc|bash_profile|profile)\b to reload the environment variables.

5. Finally test your installation

~ » go version
go version go1.9.2 linux/amd64

6. Now, start writing GO like a crazy maniac

--

--

Cloud/Software Architect and DevOps learning about #devops, #cloud, #netcore, #microservices and #newtech