How to install golang in Ubuntu?
Solution 1:
You can install the (slightly older) version with apt,
sudo apt install golang
Alternatively, use the Golang Backports PPA, which hosts the latest version of golang for Ubuntu 18.04+.
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
sudo apt install golang-1.17
You can also install the latest version with snap,
sudo snap install go --classic