Install golang from command line
Oct 17, 2021
Get the path to the tar file
https://golang.org/doc/install
https://golang.org/dl/go1.17.2.linux-amd64.tar.gz
Get the file with wget
curl -O -L "https://golang.org/dl/go1.17.2.linux-amd64.tar.gz"
Unpack with tar
tar -xf "https://golang.org/dl/go1.17.2.linux-amd64.tar.gz"
Move go to usr/local
sudo mv -v go /usr/local
Add these lines to ~/.bash_profile
# set up Go lang path #
export GOPATH=$HOME/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin