C:\Program Files\Go.
NOTE: GOPATH must not be the same path as your Go installation.> Open Settings and click on System.
GOPATH as the Variable name.C:\Program Files\Go as the Variable value.wget https://golang.org/dl/go1.24.1.linux-amd64.tar.gz sudo tar -xzf go1.24.1.linux-amd64.tar.gz -C /usr/local/
sudo nano ~/.bashrcAt the end of the file, add these lines:
export PATH=$PATH:/usr/local/go/bin export PATH=$PATH:/home/<user_name>/go/binSave and close the file, then run:
source ~/.bashrc
go version
brew install golang
go version