This also works on WSL2 Debian based, which is what I use. Navigate to the Go download page
Copy the “Linux” install link, and navigate back to your shell. Use the following commands:
wget https://dl.google.com/go/goVERSION.linux-amd64.tar.gz sudo tar -xvf goVERSION.linux-amd64.tar.gz sudo mv go /usr/local echo "export GOROOT=/usr/local/go" >> ~/.bashrc echo "export GOPATH=\$HOME/go" >> ~/.bashrc echo "export PATH=\$GOPATH/bin:\$GOROOT/bin:\$PATH" >> ~/.bashrc source ~/.bashrc Source might not work, in which case restart your terminal or shell instance.
Continue reading