Last active
September 25, 2019 20:50
-
-
Save fnzv/b0f6a6b6226cdf60504609044f8e769e to your computer and use it in GitHub Desktop.
Golang quick-install - Ubuntu 16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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