Last active
November 16, 2019 04:36
-
-
Save Luvgreed/dba5d8064235ec02d8b9ebef7ad1fb86 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
# Install Go on Ubuntu | |
VERSION="1.13.1" | |
OS="linux" | |
ARCH="amd64" | |
echo "downloading go ..." | |
curl -O https://dl.google.com/go/go$VERSION.$OS-$ARCH.tar.gz | |
echo "unzip go to /usr/local ..." | |
tar -C /usr/local -xvzf go$VERSION.$OS-$ARCH.tar.gz | |
echo "rm $go$VERSION.$OS-$ARCH.tar.gz ..." | |
rm -rf go$VERSION.$OS-$ARCH.tar.gz | |
echo "rm install_go_ubuntu.sh ..." | |
rm -rf install_go_ubuntu.sh | |
# Setup Go Environment | |
# Setup go path | |
# $ export GOPATH=$HOME/go | |
# When Go compiles and installs tools, it will put them in the $GOPATH/bin directory. | |
# For convenience, it’s common to add the workspace’s /bin subdirectory to your PATH | |
# $ export PATH=$PATH:$GOPATH/bin | |
# Finally, you need to add the go binary to your PATH. | |
# $ export PATH=$PATH:/usr/local/go/bin | |
# Verify Installation | |
# $ go version | |
# $ go env | |
# $ go env GOPATH | |
# $ echo $GOPATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment