DEV Community

Cover image for Install GO in UBUNTU machines
Ahmed Abir
Ahmed Abir

Posted on

Install GO in UBUNTU machines

Download Source

Download source from this link Go Binaries

Unpack Packages

After downloading the binary file may be in your ~/Downloads folder from terminal
use this command

cd Downloads
Enter fullscreen mode Exit fullscreen mode

Then list the items in the directory by this command

ls -l | grep go
Enter fullscreen mode Exit fullscreen mode

go-binary-find

Extract the binary files from the go1.22.2.linux-amd64.tar.gz file in the download folder (you may have download the another version) use this command

sudo tar -C /usr/local -xzf go1.22.2.linux-amd64.tar.gz
Enter fullscreen mode Exit fullscreen mode

This command will extract the file into /usr/local folder

Add to PATH variable

Where the go binaries are you need to find it and then the path should be added to you path variable otherwise you will encounter some problems like go command not found by this command will be able to locate the go binary where it is

whereis go
Enter fullscreen mode Exit fullscreen mode

whereis-go
Now copy the path and use below command

export PATH=$PATH:{your_copied_path_here}/bin
Enter fullscreen mode Exit fullscreen mode

Verify Installation

Now use below command to verify your Installation

go version
Enter fullscreen mode Exit fullscreen mode

verify-installation

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay