Rate This Document
Findability
Accuracy
Completeness
Readability

Installing Go

  1. Download the Go source package. In this example, the source package is saved to the /home directory.
    cd /home
    wget https://dl.google.com/go/go1.17.7.linux-arm64.tar.gz
  2. Decompress the source package to the /usr/local directory.
    tar -zxvf go1.17.7.linux-arm64.tar.gz -C /usr/local
  3. Set environment variables.
    1. Open the /etc/profile file.
      vim /etc/profile
    2. Press i to enter the insert mode, and add the following content to the end of the file:
      export GOROOT=/usr/local/go
      export PATH=$PATH:$GOROOT/bin
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Make the environment variables take effect.
    source /etc/profile
  5. View the installation path.
    ls /usr/local/go

  6. View the version.
    go version