1) Linux installation
In ~ # create the folder under go, and go into the folder mkdir ~ / go && cd ~ / go download go archive wget HTTPS: // dl.google.com/go/go1.11.5.linux-amd64.tar .gz
Execution tar
extract to /usr/loacl
the directory (the official recommended), get go
folders, etc.
tar -C /usr/local -zxvf go1.11.5.linux-amd64.tar.gz
Add /usr/loacl/go/bin
directory to the PATH variable. Add to /etc/profile
or $HOME/.profile
can
# Accustomed to using vim, if you can not use the command `sudo apt- GET install vim` install a vim / etc / Profile # Add the last line of Export GOROOT = / usr / local / Go Export the PATH = $ the PATH: $ GOROOT / bin # save and exit at source (vim to use their search can) source / etc / Profile
You can view the version of go go version