Install Go on macOS
| Homebrew | |
| Install with Homebrew | |
| go version | |
| PATH setup |
Homebrew
Homebrew is the most common way to manage developer tools on macOS, and it ships a recent Go release.
If Homebrew is not installed yet, set it up first with its own installer, then return here for the one line Go install.
Install with Homebrew
Open Terminal and install the Go formula.
brew install go
Homebrew places the toolchain under its own cellar folder and links the go binary into your shell PATH.
There is no manual archive unpacking and no extra environment setup for a basic start.
go version
A fresh install should answer with its version number and show the default workspace.
go version
go version go1.21 darwin/arm64
go env GOPATH
/Users/user/go
PATH setup
Homebrew normally configures PATH for you, so new terminals find go without extra edits.
Only touch shell profiles when go version still fails, or when you want the Go workspace bin folder early in PATH.
Next: Install Go on FreeBSD
Article author: Arthur Isaev