Skip to content

Instantly share code, notes, and snippets.

@felipefbs
Last active October 4, 2021 18:13
Show Gist options
  • Save felipefbs/9c60fa741942807976d5164299efa0ee to your computer and use it in GitHub Desktop.
Save felipefbs/9c60fa741942807976d5164299efa0ee to your computer and use it in GitHub Desktop.
Thais script helps to install Go version 1.17.1 in your machine. Remember to run with SUDO.
#!/usr/bin/env bash
# This script works only with go 1.17.1 version
GO_FILE=go1.17.1.linux-amd64.tar.gz
wget https://dl.google.com/go/${GO_FILE}
sudo tar -C /usr/local -xzf ${GO_FILE}
mkdir $HOME/go $HOME/go/src $HOME/go/pkg $HOME/go/bin
### Add this to file path in your rc file
export PATH="$PATH:/usr/local/go/bin"
export GOPATH="$HOME/go"
export PATH="$PATH:$GOPATH/bin"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment