Skip to content

Instantly share code, notes, and snippets.

@kaustubhkapatral
Last active September 12, 2022 10:35
Show Gist options
  • Save kaustubhkapatral/e0ee6100acb42bd9d4d97f067f7ce3eb to your computer and use it in GitHub Desktop.
Save kaustubhkapatral/e0ee6100acb42bd9d4d97f067f7ce3eb to your computer and use it in GitHub Desktop.
wget https://golang.org/dl/go1.18.5.linux-amd64.tar.gz
sudo tar -xvf go1.18.5.linux-amd64.tar.gz
sudo mv go /usr/local
mkdir -p go/src/github.com
mkdir go/bin
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin
export PATH=$PATH:/usr/local/go/bin:$GOBIN
echo "" >> ~/.bashrc
echo 'export GOROOT=/usr/local/go' >> ~/.bashrc
echo 'export GOPATH=$HOME/go' >> ~/.bashrc
echo 'export GOBIN=$GOPATH/bin' >> ~/.bashrc
echo 'export PATH=$PATH:/usr/local/go/bin:$GOBIN' >> ~/.bashrc
sudo rm -rf go1.18.5.linux-amd64.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment