Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Linux » How to install Golang on a Linux System
  • Screenshot 2020 08 14 at 23.03.54
    How to disable Taskbar Web Search in Windows 10 via GPO and Windows Registry Windows
  • banner2 1
    How to use GitHub as Source Provider for AWS CodePipeline AWS/Azure/OpenShift
  • The evolution of Windows authentication   NTLM to Keberos
    Bidding Farewell to NTLM in favour of Kerberos Windows
  • downloadzoom recording
    How to download a shared ZOOM recording JIRA|Confluence|Apps
  • MM
    How to install Mattermost on Ubuntu and Debian Linux
  • apache ubuntu 20 04
    How to Install Apache HTTP Server on Ubuntu 20.04 LTS Linux
  • Fix OneDrive Error
    How to Fix OneDrive Error 0x80071129: The tag present in the reparse point buffer is invalid Windows
  • ESXi
    How to install ESXi on VirtualBox Virtualization

How to install Golang on a Linux System

Posted on 27/06/202209/07/2023 Raphael Gab-Momoh By Raphael Gab-Momoh No Comments on How to install Golang on a Linux System
goland

Google created the compiled, statically typed programming language known as Go. Besides, you must be wondering why the language is called “Go.” The language has two names: Go and Golang. Go is the name of the language. The name “Golang” was given to the website since its initial domain name was golang.org. Are you looking to harness the power of Golang on your Linux system? No worries, your search is over. In this comprehensive guide, we’ll walk you through how to install Golang on a Linux system.

The steps to download Go are as shown below: Other guides can accessed here: How to install and configure Apache Cassandra on Linux Server and how to install Gradle on Ubuntu

Steps to Installing Golang on Linux Machine

Step 1: Downloading Go binary files

To obtain the most recent Go binary from the official download website, use curl or wget.

curl -O https://storage.googleapis.com/golang/go1.18.3.linux-amd64.tar.gz

The Go version you should download is 1.18.3. However, if necessary, you can use any other version in its place. The output is as shown below:

root@ubuntu:/home/rdgmh# curl -O https://storage.googleapis.com/golang/go1.18.3.linux-amd64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  135M  100  135M    0     0   286k      0  0:08:03  0:08:03 --:--:--  362k
root@ubuntu:/home/rdgmh# 

Step 2: Taking out data from the tar.gz file

To open the package, use tar. Subsequently, this opens and expands the downloaded tar.gz file. Create a folder with the package name using the tar tool and the following command:

tar -xvf go1.18.3.linux-amd64.tar.gz

next, move the folder to  /usr/local

sudo mv go /usr/local

Go is now in your $PATH for Linux thanks to the Go package, which is located in /usr/local.

Step 3: Setting paths

Next step in installing Golang on Linux is setting paths. Hence, we must create some paths for Go. The paths listed in this step are all positioned relative to the /usr/local directory where the Go installation is located. In order to tell Go where to look for its files, the root value must first be set. Therefore, to open the file in your preferred editor, run the command below:

sudo vim ~/.profile

At the document’s end opened by the command above, include the following lines:

export GOPATH=$HOME/work
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
How to install Golang on a Linux System-proflle
.profile

You can use any directory in place of $HOME/work. You will be able to use the Go language’s features from this location.

save and close the file then refresh with the command below:

source ~/.profile

Step 4: Verify that Golang is installed on Linux

Checking to see if your installation was successful is always a smart idea. However, you may accomplish this by looking up the Golang language version currently installed on your Linux machine.

go --version

The terminal will show the Go version currently installed on your computer just as shown in the screenshot below:

How to install Golang on a Linux System-go-version
go version

Summary

We installed Go on a Linux system by following a series of steps as described above. By following the step-by-step guide, you should know how to install Golang on a Linux system.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Pocket (Opens in new window) Pocket
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
Linux

Post navigation

Previous Post: SSH into a VM created using Azure CLI or GUI
Next Post: How To Install Google Cloud SDK on a Linux System

Related Posts

  • Slide1 1
    Create Multiple Users with Passwords in Ubuntu Linux Linux
  • Rport
    RPORT the free and open source remote management tool Linux
  • featuredpkg
    How to solve /var/lib/dpkg/lock Error in Ubuntu Linux Linux
  • Gfeature
    How to install Googler on a Linux System Linux
  • RUST FEATURE
    How to install Rust in a Linux System Linux
  • S3 Bucket 1
    How to delete AWS S3 Bucket and Objects via  AWS CLI from Linux AWS/Azure/OpenShift

More Related Articles

Slide1 1 Create Multiple Users with Passwords in Ubuntu Linux Linux
Rport RPORT the free and open source remote management tool Linux
featuredpkg How to solve /var/lib/dpkg/lock Error in Ubuntu Linux Linux
Gfeature How to install Googler on a Linux System Linux
RUST FEATURE How to install Rust in a Linux System Linux
S3 Bucket 1 How to delete AWS S3 Bucket and Objects via  AWS CLI from Linux AWS/Azure/OpenShift

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • Screenshot 2020 08 14 at 23.03.54
    How to disable Taskbar Web Search in Windows 10 via GPO and Windows Registry Windows
  • banner2 1
    How to use GitHub as Source Provider for AWS CodePipeline AWS/Azure/OpenShift
  • The evolution of Windows authentication   NTLM to Keberos
    Bidding Farewell to NTLM in favour of Kerberos Windows
  • downloadzoom recording
    How to download a shared ZOOM recording JIRA|Confluence|Apps
  • MM
    How to install Mattermost on Ubuntu and Debian Linux
  • apache ubuntu 20 04
    How to Install Apache HTTP Server on Ubuntu 20.04 LTS Linux
  • Fix OneDrive Error
    How to Fix OneDrive Error 0x80071129: The tag present in the reparse point buffer is invalid Windows
  • ESXi
    How to install ESXi on VirtualBox Virtualization

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,832 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.