Skip to content

Instantly share code, notes, and snippets.

@devx
Created April 25, 2019 14:49
Show Gist options
  • Save devx/14fbd7b1137bca7a92901576172ba358 to your computer and use it in GitHub Desktop.
Save devx/14fbd7b1137bca7a92901576172ba358 to your computer and use it in GitHub Desktop.
install latest version of GO
#!/bin/sh
GOVER=1.12.4
wget https://dl.google.com/go/go${GOVER}.linux-amd64.tar.gz
tar zxf go1.12.4.linux-amd64.tar.gz
mv go /usr/local/
rm go1.12.4.linux-amd64.tar.gz
echo 'export GOROOT=/usr/local/go' | sudo tee -a /etc/profile
echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee -a /etc/profile
source /etc/profile
echo 'export GOPATH=${HOME}/go' | sudo tee -a ~/.bashrc
mkdir ${HOME}/go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment