Installation

You can run the following command, just specify the kind of CPU architecture your device is running and go version you wish to use. Don’t forget to run a SHA256 checksum to make sure that the tar.gz is NOT corrupted. Check the SHA256 hash beforehand.

Afterwards, attach /usr/local/go to your PATH so that the TERM environment can see your go binary globally. In this case, you can add the /usr/local/go to your interpreter’s <shell>.rc file:

wget https://go.dev/dl/go1.26.4.linux-amd64.tar.gz \
&&                                                 \
sha256sum go1.26.4.linux-amd64.tar.gz | grep '1153d3d50e0ac764b447adfe05c2bcf08e889d42a02e0fe0259bd47f6733ad7f'
rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.26.4.linux-amd64.tar.gz
# export the /usr/local/go/bin directory and attach to the .bashrc file

export PATH=$PATH:/usr/local/go/bin

# and then source it to be able to use it in the current term, or just quit and launch it again...

source ~/.bashrc

Check if go has been installed by checking its version:

go version

go version go1.26.4 linux/amd64

Hello World

package main

import "fmt"

func main() {
    fmt.Println("Hello, world")
}