How to install Golang (latest version) on Kali Linux
So i was trying to download Golang for a week now and this journey was full of ERRORs so i wrote this blog because i don't want anyone to suffer like i did haha.
Let's get started:
So first we need to check there are no older Go versions installed by using :
which go
Now we know where is go we can delete it using:
rm -rf {insert the path here}
Now we can download the latest version from: https://golang.org/dl/
Now we need to extract the downloaded .tar folder, First we need to navigate to the Downloads folder from the terminal using:
cd {insert the directory path}
Now extract the folder:
tar -C /usr/local/ -xzf {insert the file name}
Now we need to add the variables in the zshrc folder using
nano ~/.zshrc
Go down at the end of the file and add:
#go variables
export GOPATH=/root/go-workspace
export GOROOT=/usr/local/go
PATH=$PATH:$GOROOT/bin/:$GOPATH/bin
Then press ctrl o to save then enter key then ctrl x to close the file
Then to refresh the zshrc file we gonna use this command:
source ~/.zshrc
Now we can celebrate WOOOOO 🎉🎊
Use this command to know the go version:
go version
I love connecting with different people so if you want to say hi, I’ll be happy to meet you more! :)
LinkedIn
Twitter