How to Install Go Programming Language on Linux and fix it not responding in Terminal when it’s clearly installed:

I’m on Kali Linux and Ubuntu trying to install Go on the endpoint. I kept running into the issue where I would install Go with the following instructions:

Steps to install Go:

wget https://go.dev/dl/go1.20.4.linux-amd64.tar.gz

sudo tar -C /usr/local -xzf go1.20.4.linux-amd64.tar.gz

nano ~/.bashrc

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

source ~/.bashrc

go version

This failed , “

Command 'go' not found, but can be installed with:

sudo apt install golang-go
sudo apt install gccgo-go"

Turns out I also needed to add export PATH=$PATH:/usr/local/go/bin to the ~./profile txt config file as well:

I had to add the following line to ~./profile as well:

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

Then ran source ~./profile
Now it gives me a version number when I type : go version and appears to be installed correctly.

SyntheticSecurity

threat and malware research, analyst , ramblings on technology and history