Setup · 02
02. Installing Go
Download, install, and verify a working Go toolchain on macOS, Linux, or Windows.
Install Go from go.dev/dl by picking the appropriate package for your operating system. If you’re on Mac, you can also use Homebrew.
After installing Go, verify the install from by opening a new terminal:
$ go version
go version go1.26.3 darwin/arm64
The version number will differ, but what matters is that the command runs. If your shell can’t find go, restart the terminal so it picks up the new PATH. Run the following command. The output might differ, depending on the OS and installation method.
$ go env GOROOT GOPATH
/usr/local/go
/Users/you/go
GOROOT is where the toolchain lives. GOPATH is where downloaded packages and built binaries land, which is ~/go by default.
That’s the whole setup. In the next lesson we’ll write and run a first Go program.