How to Install Golang on WSL/WSL2 Kali
How to Install Golang on WSL/WSL2 Kali
Install Go-
At the time of writing this blog, the most recent LTS version of Go is 1.18.3.
wget https://dl.google.com/go/go1.18.3.linux-amd64.tar.gz
sudo tar -xvf go1.18.3.linux-amd64.tar.gz
sudo mv go /usr/local
Edit .bashrc file-
You have to edit .bashrc file before making further changes, you can follow below steps to open .bashrc file
cd ~
explorer.exe .
Open .bashrc file and add following lines at the bottom and save the file-
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
Refresh your terminal using **bash **command
bash
Check Go Version
go version
Make sure it returns the same version that you installed.
Comments
Post a Comment