Last active
September 12, 2022 10:35
-
-
Save kaustubhkapatral/e0ee6100acb42bd9d4d97f067f7ce3eb to your computer and use it in GitHub Desktop.
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
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