Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nk-gears/423cd09a8bf8491489de96abe71bc193 to your computer and use it in GitHub Desktop.
Save nk-gears/423cd09a8bf8491489de96abe71bc193 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