top of page

How to Install Go on Kali Linux

Writer's picture: TEAMTEAM

Laptop in a dimly lit room with blue screen displaying "InstalGo" software interface. The mood is focused and tech-centric.

How to Install Go on Kali Linux

Let's get started. First, let's check if older versions of Go are installed:

1

which go

If you have an old version installed, you should uninstall it with the command:

1

rm -rf {путь к папке}

Now we can download the latest version from the Go official website


Go downloads page with links for Windows, macOS, Linux, and Source. Black bar at top supports Equal Justice. Text details instructions.

After downloading, go to the Downloads directory:

1

cd {Path to the directory}


Kali Linux terminal shows "cd /home/kali/Downloads/". Text is in red and blue on a dark background. Path changes upon command.

Now extract the folder:

1

tar -C /usr/local/ -xzf {this file}

Write environment variables to the zshrc folder using the command:

1

nano ~/.zshrc

Go to the end of the file and add:

1

2

3

4

#go variables

export GOPATH=/root/go-workspace

export GOROOT=/usr/local/go

PATH=$PATH:$GOROOT/bin/:$GOPATH/bin


Kali Linux terminal showing nano editor with /root/.zshrc file open. Commands for aliases and Go variables are highlighted in red.

Once added, press the keyboard shortcut “CTRL O” then “CTRL X” to close the file.

Then, to update the zshrc file, we will use this command:

1

source ~/.zshrc

Checking the Go version:

1

go version


Terminal window displays the command "go version" and its output: "go version go1.16.6 linux/amd64" on a dark text background.

That's all. Now you know how to install Go on Kali Linux.

Recent Posts

See All

Comments


bottom of page