Skip to content

Installing Go

Go ships as a single, self-contained toolchain: a compiler, formatter, test runner, and dependency manager, all behind one go command. There’s no separate package manager or build system to configure.

Pick the path for your OS:

  • macOS: brew install go, or download the .pkg installer from go.dev/dl.
  • Linux: download the tarball from go.dev/dl and extract it to /usr/local, then add /usr/local/go/bin to your PATH.
  • Windows: download the .msi installer from go.dev/dl; it sets up PATH for you.

Most Linux distributions also ship a golang package, but it often lags behind the latest release — the official tarball is usually the better choice for tutorials like this one.

Terminal window
go version

You should see something like go version go1.23.4 darwin/arm64. If you get “command not found”, double-check that go’s bin directory is on your PATH.

Any editor works, but the smoothest experience is:

  • VS Code with the official Go extension (gives you gofmt, go vet, and debugging out of the box).
  • GoLand if you want a full IDE with more built-in refactoring tools.

Both will auto-install gopls, Go’s language server, the first time you open a .go file.

Since Go 1.16, every project is a module — a tree of Go source files with a go.mod file at its root describing the module’s name and dependencies. You’ll create your first one in the next chapter.