This Tutorial is for 20.04, but should be similar for other ubuntu versions
- Downloading the Go tarball (assume the version is 1.14.2)
sudo wget -c https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local
2. Adjusting the Path Variable
export PATH=$PATH:/usr/local/go/bin
or add it to start up script
# append to ~/.bashrc
export PATH=$PATH:/usr/local/go/bin
# then
source ~/.bashrc
3. Verifying the Go Installation
go version
more information of how to use go, please checkout