Skip to content

Instantly share code, notes, and snippets.

@TheBinitGhimire
Created December 1, 2020 16:56
Show Gist options
  • Save TheBinitGhimire/869ab1be63b1cf9a8e71d4a8b012998c to your computer and use it in GitHub Desktop.
Save TheBinitGhimire/869ab1be63b1cf9a8e71d4a8b012998c to your computer and use it in GitHub Desktop.
Install Go on Ubuntu and Debian-based Linux distributions!
#!/bin/bash
# Install Go on Ubuntu and Debian-based Linux distributions!
: '
Perform the following:
1. chmod +x go.sh;
2. ./go.sh;
OR
1. bash go.sh;
'
wget https://golang.org/dl/go1.15.5.linux-amd64.tar.gz;
tar -xvf go1*;
mv go /usr/local;
rm go1*.gz;
echo -e "export GOPATH=\$HOME/go\nexport GOROOT=/usr/local/go\nexport PATH=/usr/local/sbin/:\$GOPATH/bin:\$GOROOT/bin:\$PATH\n" >> ~/.*shrc
source ~/.*shrc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment