Go · Stage 0 – Before You Code · Lesson 3 of 64

Installing Go

Install Go step by step on Windows, macOS, or Linux and verify the installation.

Use the official download page at go.dev/dl. Choose only the section for your operating system.

Windows: Download the Microsoft Installer file ending in .msi for Windows. Open it, choose Next, accept the license, keep the default destination, and choose Install. Approve the publisher only when it identifies the Go project or Google. Finish the installer, then open a new PowerShell window.

Command

go version
Line-by-line explanation
  1. go starts the installed Go tool.
  2. version asks it to identify itself.
  3. Press Enter to run the command.
Expected output
go version go1.24.5 windows/amd64

Your version number may be newer. The final architecture may be amd64 or arm64.

macOS: Download the package ending in .pkg that matches Apple ARM64 or Intel AMD64. Open it, choose Continue, accept the license, and choose Install. Enter your Mac password when macOS requests permission. Open a new Terminal window.

Command

go version
Line-by-line explanation
  1. go selects the toolchain.
  2. version requests version information.
Expected output
go version go1.24.5 darwin/arm64

macOS is identified as darwin. Intel Macs normally show amd64.

Linux: On Ubuntu, first remove any old manually installed Go folder only if you know one exists. Download the current Linux archive from go.dev/dl. Follow the official page’s Linux installation instructions because the filename changes with each version. After extracting it to /usr/local/go, add /usr/local/go/bin to PATH and open a new terminal.

Command

go version
Line-by-line explanation
  1. The go tool should now be available through PATH.
  2. Version prints the installed release and target.
Expected output
go version go1.24.5 linux/amd64

Your version and architecture can differ. A line beginning with go version go confirms success.