How to install Go on Ubuntu

This Tutorial is for 20.04, but should be similar for other ubuntu versions

  1. 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

https://golang.org/doc/code#Workspaces

Share This

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*
*