BOOK THIS SPACE FOR AD
ARTICLE AD▶ Enable root mode : sudo su
▶ Check for the updates : apt update
▶ Install Updates if available : apt upgrade
▶ Check go lang is installed or not : go version
▶ Visit : https://golang.org/dl/
▶ You can download latest go Lang for Linux via GUI or CLI (will do it using CLI)
▶ Download latest go Lang for Linux : wget https://golang.org/dl/go[version]linux-amd64.tar.gz
▶ Extract the archive you downloaded into /usr/local, creating a Go tree in /usr/local/go : rm -rf /usr/local/go && tar -C /usr/local -xzf go[Version]linux-amd64.tar.gz
▶ Add environment PATH variables for go Lang :
Open : nano ~/.zshrc
Go to the bottom of this file and enter below lines -
GOPATH=/root/go-workspace
export GOROOT=/usr/local/go
PATH=$PATH:$GOROOT/bin/:$GOPATH/bin
Then click CTRL+O and press ENTER to save the file
And to exit from this file click CTRL+X
After this refresh the terminal : source ~/.zshrc
▶ Check installation : go version
More info : https://golang.org/