Skip to content

Instantly share code, notes, and snippets.

@riandyrn
Last active December 18, 2021 21:23
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save riandyrn/d8d624aa59f66ae2d29717fdece1e558 to your computer and use it in GitHub Desktop.
Save riandyrn/d8d624aa59f66ae2d29717fdece1e558 to your computer and use it in GitHub Desktop.
[Install Golang 1.13.4 on AMI Linux]

Install Golang

cd /usr/local/
sudo wget https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz
sudo tar -xzf go1.13.4.linux-amd64.tar.gz

Append Golang Binary to Path

cd /etc/profile.d
sudo nano go.sh
#insert following lines: 
export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/go

After that exit the terminal to load the newly applied environment variables.

Updating Golang

cd /usr/local
sudo rm -rf go
repeat the process of installing new golang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment