der@SA:/usr/local$ export|grep GO
declare -x GOPATH="/home/der/GOPATH"declare -x GOROOT="/usr/local/go"declare -x PATH="/home/der/GOPATH/bin:/usr/local/go/bin:/home/limeng/GOPATH/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
測試是否安裝成功,打開終端,輸入go,有輸出則安裝成功
der@SA:~$ go
Go is a tool for managing Go source code.Usage:go <command>[arguments]The commands are:bug start a bug reportbuild compile packages and dependenciesclean remove object files and cached filesdoc show documentation for package or symbolenv print Go environment informationfix update packages to use new APIsfmt gofmt (reformat) package sourcesgenerate generate Go files by processing sourceget add dependencies to current module and install theminstall compile and install packages and dependencieslist list packages or modulesmod module maintenancerun compile and run Go programtesttest packagestool run specified go toolversion print Go versionvet report likely mistakes in packagesUse "go help <command>"formore information about a command.Additional help topics:buildmode build modesc calling between Go and Ccache build and test cachingenvironment environment variablesfiletype file typesgo.mod the go.mod filegopath GOPATH environment variablegopath-get legacy GOPATH go getgoproxy module proxy protocolimportpath import path syntaxmodules modules, module versions, and moremodule-get module-aware go getmodule-auth module authentication using go.summodule-private module configuration for non-public modulespackages package lists and patternstestflag testing flagstestfunc testing functionsUse "go help <topic>"formore information about that topic.