Open In App

How to Install Go on Debian 10?

Improve
Improve
Like Article
Like
Save
Share
Report

Go is an open-source programming language built by google to write microservices. Its syntax is inspired by java and the c++. Using Golang it is easy to build simple, reliable, and efficient software In this article we are going to see how we can install Golang in our Debian System.

System on which we are going to install Go:

Install neofetch to list the information about your system.

sudo apt install neofetch

Run the following command to execute neofetch:

neofetch
neofetch command

System Information

Installing Golang:

Step 1: Go to the Golang installation page and download the setup file.

Downloading Golang

Downloading Golang

Or run the following command:

wget https://golang.org/dl/go1.17.1.linux-amd64.tar.gz

Step 2: Navigate to the Downloads folder and extract the downloaded archive into /usr/localb, by running the following command in the terminal.

sudo tar -C /usr/local -xzf go1.17.1.linux-amd64.tar.gz
Extracting and moving the file

Extracting and moving the file

Step 3: Add /usr/local/go/bin to the PATH environment variable. To add the PATH, place the following command to the $HOME/.profile or /etc/profile.

export PATH=$PATH:/usr/local/go/bin
Exporting the path of the Golang

Exporting the path of the Golang

Step 4: Verify the installation of Golang by opening a new terminal and typing the following command:

go version
Golang  successfully installed

Golang  successfully installed


Last Updated : 06 Oct, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads