Skip to content

installing Go

In Linux, use wget -P /tmp https://dl.google.com/go/go1.12.5.linux-amd64.tar.gz && sudo tar -C /usr/local -xzf /tmp/go1.12.5.linux-amd64.tar.gz, then add these lines to $HOME/.profile:

# Set GOROOT
export GOROOT=/usr/local/go
export PATH=$GOROOT/bin:$PATH

Reboot.

To uninstall, use rm -rvf /usr/local/go/, then remove the text previously added to $HOME/.profile.

Personal experience
  • Works on Slim running CentOS 7.
  • Tested in Kubuntu 17.10.

explanation

Note

This is an incomplete explanation.

  • wget -P /tmp https://dl.google.com/go/go1.12.5.linux-amd64.tar.gz downloads the Linux tar.
  • sudo tar -C /usr/local -xzf /tmp/go1.12.5.linux-amd64.tar.gz extracts the tar and creates a Go tree in /usr/local/go.

licensing

Some rights reserved: CC BY-SA 3.0. Includes significant content from an answer on Ask Ubuntu by Tony, with modifications.

prior work