How to Install GoLang on Ubuntu 20.04 LTS ⤵️
January 31, 2021•126 words
Method #1 - From Apt Repository
sudo apt install golang
Method #2 - From the Binaries
- Download the binaries:
wget https://dl.google.com/go/go1.15.7.linux-amd64.tar.gz
- Extract the files local:
sudo tar -C /usr/local -xzf go1.15.7.linux-amd64.tar.gz
- Then add the path
sudo vim ~/.profile
withexport PATH=$PATH:/usr/local/go/bin
- Finally, verify the installation with
go version
Method #3 - Via the Snap Store
The snap will install Go along with the compiler, linker and stdlib
Just run sudo snap install go --classic
Note that this method is usually not preferred, due to Snap packages not respecting different levels of application trust.
Snaps are also slow to load, take up more space, often receive updates later, and don't always play nice with other apps.