
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

After downloading, go to the Downloads directory:
1 | cd {Path to the directory} |

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 |

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 |

That's all. Now you know how to install Go on Kali Linux.
ความคิดเห็น