Christian Maurer

Notes on Go

Notes on the installation of Go under Linux

Here the original » go.dev/doc/install

The following operations require the login as root!

You install Go by

  1. defining the required environment variables in a suitable file, preferably e.g. in » /etc/profile.d/go.sh (the values of the five lines at the end of the else-block can be changed by users if necessary – e.g. in $HOME/.bashrc),
  2. moving into the directory /usr/local/ ("cd /usr/local") and – if available – removing the subdirectory go ("rm -rf go"),
  3. copying the required (see $GOTGZ) tar.gz-file from https://go.dev/dl into this directory (for security, check its SHA256-checksum with "sha256sum $GOTGZ") and
  4. unpacking this file ("tar xfzv $GOTGZ").

» Impressum