ubuntu18.04 install go environment

1. Go to the official website or domestic mirror station to get the go installation package,

2. Unzip
tar -zxvf go1.13.4.linux-amd64.tar.gz -C /usr/lib/golang

3. Configure the global variable
vim /etc/profile
// add in the last line

export GOROOT=/usr/lib/golang/go
export PATH=$PATH:$GOROOT/bin

4. After saving, click the source /etc/profile.
5. Execute go version to verify whether the installation is successful.

Guess you like

Origin blog.csdn.net/Fengfgg/article/details/113567178