Install Go Lang on Ubuntu
In this quick tutorial we'll see how to install Go Lang version 1.19 on Ubuntu!
I keep these installation tutorials simple and straightforward because I know how frustrating it is to read through an entire article when you are simply looking for terminal commands. So if this article looks bland, it is very much on purpose :)
Intall Go Lang
Install Ubuntu updates
sudo apt-get update
sudo apt-get -y upgrade
Download Go binary
Extract the downloaded tar and install it into the desired location in the system.
sudo tar -xvf go1.19.linux-amd64.tar.gz
sudo mv go /usr/local
The Go language environment variables we need are
- Export directly from the terminal; keep in mind that using this method, you'll need to declare them again every time you restart the terminal.
- Place the environment variables in the
.bashrcfile. This way, you don't need to declare them every time you restart the terminal.
Add the environment variables at the end of the file.
Close and save the file.
Ctrl + x
Now verify that go was installed correctly with the `go version`` command.
Should return something similar to the following.
go version go1.19 linux/amd64
Did you find this article valuable?
Support Davide by becoming a sponsor. Any amount is appreciated!