In this tutorial, we will show you how to install Go on Debian 10. For those of you who didn’t know, Go is a modern open-source programming language created by Google, used to build reliable, simple, fast, and efficient software. Some popular applications that are written in Go are Docker, Kubernetes, Dropbox, Openshift, Netflix, Golang.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you through the step-by-step installation of the Go open-source programming language on a Debian 10 (Buster).
Install Go on Debian 10 Buster
Step 1. Before running the tutorial below, it’s important to make sure your system is up to date by running the following
apt commands in the terminal:
sudo apt update
Step 2. Installing Go on Debian 10.
Now we go to Go’s download page and grab a link for the latest version:
Next, extract the tar archive to the
sudo tar -C /usr/local -xzf go1.16.linux-amd64.tar.gz
Then, set the path environment variable in order to find Go executable binaries by the system. For that, we need to open
/.bash_profile using the below command:
sudo nano ~/.bash_profile
Add the below lines:
Save and close the file. After that run the below command to reload the running profile:
Here comes the easy bit, let’s check our installed go version:
$ go version go version go1.16.3 linux/amd64
Congratulations! You have successfully installed Go (Golang). Thanks for using this tutorial for installing the latest version of the Golang open-source programming language on the Debian system. For additional help or useful information, we recommend you check the official Go website.