Skip to content

Instantly share code, notes, and snippets.

@fnzv
Last active September 25, 2019 20:50
Show Gist options
  • Save fnzv/b0f6a6b6226cdf60504609044f8e769e to your computer and use it in GitHub Desktop.
Save fnzv/b0f6a6b6226cdf60504609044f8e769e to your computer and use it in GitHub Desktop.
Golang quick-install - Ubuntu 16
#!/bin/bash
# Golang quick install
apt-get update
wget https://dl.google.com/go/go1.12.9.linux-amd64.tar.gz
sudo tar -xvf go1.12.9.linux-amd64.tar.gz
sudo mv go /usr/local
echo "export GOROOT=/usr/local/go" >> /root/.bashrc
echo "export GOPATH=$HOME/Projects" >> /root/.bashrc
echo "export PATH=$GOPATH/bin:$GOROOT/bin:$PATH" >> /root/.bashrc
echo "Checking Golang version\n"
ln -s /usr/local/go/bin/go /usr/bin/go
go version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment