How to Install GoLang on Kali Linux [Go Programming Language]

/
4211 Views
img

In this article, we are going to learn how to install GoLang on Kali Linux step by step. GoLang or Go programming Language actually not preinstalled on Kali Linux so we have to install it. It is a very easy process and GoLang is now more popular language in ethical hacking and penetration testing and I have been seen many interesting tools are written by Go language and there have lots of tools like asset finding, vulnerability finding, etc. and many tools are written by Go and these tools are faster than others. Go, or GoLang is an open-source language developed by Google to create simple, reliable, and efficient software. GoLang package is not always up to date in the Debian repository. So it’s preferred to download the latest version from the official website.

Install GoLang on Kali Linux

There are two ways to install GoLang on Kali Linux.

  1. Install GoLang from the repository
  2. Install GoLang manually

Installing Golang from the repository

This is the easiest way to install the Go programming Language on Kali Linux. But Golang package is not always up to date in the Debian repository. So the following step to install the Golang on Kali Linux:

Update and Upgrade your Kali

So first of all you have to update and upgrade your Kali Linux. Using the following command you can update and upgrade your Kali:

[[email protected] ~ ]$ sudo apt update && sudo apt full-upgrade -y
Update and Upgrade your Kali

Installing Golang

GoLang package is not always up to date in the Debian repository. But we can install Golang on Kali Linux using the following command:

[[email protected] ~ ]$ sudo apt install golang -y
Installing Golang

Check Go Version

Verify that you’ve installed Go by opening a command prompt and typing the following command:

[[email protected] ~ ]$ go version
Check GoLang Version

Installing GoLang manually

GoLang package is not always up to date in the Debian repository. So above you can see this is an older version of Go Programming Language. So we have to Install the Latest Version of Golang on Kali Linux. We can install it manually. So first of all we have to open a browser and go to the official website to download the latest version of Golang:

Download Go Language

Download GoLang Stable Version

You can download the latest and stable version of the GoLang binary release suitable for your system. You can download directly or download using wget command in the terminal.

[[email protected] ~ ]$ wget https://golang.org/dl/go1<VERSION_NUMBER>.linux-amd64.tar.gz
Download GoLang Stable Version

Extract the GoLang Stable Version

Extract the archive you downloaded into /usr/local, you can extract the latest and stable version running the following command as root or through sudo:

[[email protected] ~ ]$ sudo tar -C /usr/local -xzf go1.<VERSION_NUMBER>.linux-amd64.tar.gz

[alert title=Important style=”danger “]This step will remove a previous installation at /usr/local/go, if any, prior to extracting. Please back up any data before proceeding.[/alert]

Extract the GoLang Stable Version

Add variables for Golang

Add /usr/local/go/bin to the PATH environment variable. You can do this by adding the following line to your $HOME/.profile

[[email protected] ~ ]$ echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.profile
[[email protected] ~ ]$ echo "export GOPATH=~/.go" >> ~/.profile
[[email protected] ~ ]$ source ~/.profile

[alert title=Note]Changes made to a profile file may not apply until the next time you log into your computer. To apply the changes immediately, just run the shell commands directly or execute them from the profile using a command such as source $HOME/.profile.[/alert]

Add variables for Golang

Check Go Version

Verify that you’ve installed Go by opening a command prompt and typing the following command:

[[email protected] ~ ]$ go version
Check Go Version manually

Now ready to use Golang on Kali machine. So this is the way to Install GoLang on Kali Linux. If you want the latest version, you have to install the Go programming language manually.

IMPORTANT THINGS TO REMEMBER

  • This article was written only for educational purposes.
  • The author can not be held any responsibility for damage caused by the use of these resources.
  • You will not use this information to gain unauthorized access or any other legal activity.

Read also Disclaimer

If you are using any illegal activities using these techniques kalilinuxtutorial.com can’t hold any responsibility for your action.

Finally

If you have any questions about this article, any feedback, suggestions, or if you want to share your thoughts, please feel free to comment below.
If you want to speak with us directly you can Contact Us.

  • Facebook
  • Twitter
  • Pinterest
  • Reddit

Leave a Comment

Your email address will not be published.

This div height required for enabling the sticky sidebar
Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views :
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Accept
Privacy Policy